diff --git a/tests/template_tests/filter_tests/test_urlize.py b/tests/template_tests/filter_tests/test_urlize.py index 8f84e62c92..c19103859e 100644 --- a/tests/template_tests/filter_tests/test_urlize.py +++ b/tests/template_tests/filter_tests/test_urlize.py @@ -305,6 +305,23 @@ class FunctionTests(SimpleTestCase): "http://testing.com/example.,:;)"!", ) + def test_trailing_semicolon(self): + self.assertEqual( + urlize("http://example.com?x=&", autoescape=False), + '' + "http://example.com?x=&", + ) + self.assertEqual( + urlize("http://example.com?x=&;", autoescape=False), + '' + "http://example.com?x=&;", + ) + self.assertEqual( + urlize("http://example.com?x=&;;", autoescape=False), + '' + "http://example.com?x=&;;", + ) + def test_brackets(self): """ #19070 - Check urlize handles brackets properly