diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-03-06 21:56:11 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2015-03-06 22:20:14 +0100 |
| commit | ec808e807ad711b993f199f6b4165ac6d0e1125b (patch) | |
| tree | 8a76a9169f1a3da7d0915332b2a3c6f34422eb0f /tests | |
| parent | ceaf31adfff3801f1092a215f73704e15a70e90c (diff) | |
Fixed urlize regression with entities in query strings
Refs #22267.
Thanks Shai Berger for spotting the issue and Tim Graham for the
initial patch.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_urlize.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_urlize.py b/tests/template_tests/filter_tests/test_urlize.py index 716bf9e6f5..1c55d64751 100644 --- a/tests/template_tests/filter_tests/test_urlize.py +++ b/tests/template_tests/filter_tests/test_urlize.py @@ -73,6 +73,14 @@ class UrlizeTests(SimpleTestCase): 'Email me at <<a href="mailto:me@example.com">me@example.com</a>>', ) + @setup({'urlize09': '{% autoescape off %}{{ a|urlize }}{% endautoescape %}'}) + def test_urlize09(self): + output = self.engine.render_to_string('urlize09', {'a': "http://example.com/?x=&y=<2>"}) + self.assertEqual( + output, + '<a href="http://example.com/?x=&y=%3C2%3E" rel="nofollow">http://example.com/?x=&y=<2></a>', + ) + class FunctionTests(SimpleTestCase): |
