Skip to content

Commit

Permalink
glamr/tests: fix HTML href detecting regex
Browse files Browse the repository at this point in the history
This did not detect <a> hrefs additionaln attributes before the href="",
e.g. class etc. of which we have quite a few.
  • Loading branch information
robert102 committed Dec 11, 2024
1 parent af70d2a commit 6ab0b54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mibios/glamr/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_summaries(self):
class DeepLinkTests(TestDataMixin, TestCase):
MAX_DEPTH = 2

href_pat = re.compile(r'<a href="([/?][^"]+)"')
href_pat = re.compile(r'<a [^>]*href="([/?][^"]+)"')
""" pattern for local links """

def do_test_for_url(self, url, depth, parent):
Expand Down

0 comments on commit 6ab0b54

Please sign in to comment.