diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-21 10:28:59 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-21 12:11:38 -0500 |
| commit | 3f15935420c0f45760804b807a78a26f4ffe28e4 (patch) | |
| tree | b41a8d8b3036e5371aca6d05288a06db0b263fd7 /tests/template_tests | |
| parent | be0620b49fce5ddd179356575603c4160390965e (diff) | |
Refs #36705 -- Added coverage for multiple types of enclosing punctuation in urlize().
This case was inadvertently fixed in ad94446fcc5b50401dd0c48718502d5d1b92df58.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_urlize.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_urlize.py b/tests/template_tests/filter_tests/test_urlize.py index 692c3fc830..c8c403ba95 100644 --- a/tests/template_tests/filter_tests/test_urlize.py +++ b/tests/template_tests/filter_tests/test_urlize.py @@ -218,6 +218,13 @@ class FunctionTests(SimpleTestCase): 'rel="nofollow">https://en.wikipedia.org/wiki/Django_(web_framework)</a>)', ) + def test_parenthesis_and_bracket(self): + self.assertEqual( + urlize("[(https://en.wikipedia.org/)]"), + '[(<a href="https://en.wikipedia.org/" ' + 'rel="nofollow">https://en.wikipedia.org/</a>)]', + ) + def test_nofollow(self): """ #12183 - Check urlize adds nofollow properly - see #12183 |
