summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-06-26 21:14:30 +0200
committerClaude Paroz <claude@2xlibre.net>2014-09-09 21:58:07 +0200
commit4b8a1d2c0d1a8c5107f3aef01597db78d2a2a5ce (patch)
treef23e274b5f112fadf6f4df992db65c8c91a73083 /tests
parent9562ffea9719f2b1795e676718c6d433a1f8d4ed (diff)
Fixed #22267 -- Fixed unquote/quote in smart_urlquote
Thanks Md. Enzam Hossain for the report and initial patch, and Tim Graham for the review.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils_tests/test_html.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index d08eb0be2b..374628dc0c 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -173,7 +173,11 @@ class TestUtilsHtml(TestCase):
# Ensure that everything unsafe is quoted, !*'();:@&=+$,/?#[]~ is considered safe as per RFC
self.assertEqual(quote('http://example.com/path/öäü/'), 'http://example.com/path/%C3%B6%C3%A4%C3%BC/')
self.assertEqual(quote('http://example.com/%C3%B6/ä/'), 'http://example.com/%C3%B6/%C3%A4/')
- self.assertEqual(quote('http://example.com/?x=1&y=2'), 'http://example.com/?x=1&y=2')
+ self.assertEqual(quote('http://example.com/?x=1&y=2+3&z='), 'http://example.com/?x=1&y=2+3&z=')
+ self.assertEqual(quote('http://example.com/?q=http://example.com/?x=1%26q=django'),
+ 'http://example.com/?q=http%3A%2F%2Fexample.com%2F%3Fx%3D1%26q%3Ddjango')
+ self.assertEqual(quote('http://example.com/?q=http%3A%2F%2Fexample.com%2F%3Fx%3D1%26q%3Ddjango'),
+ 'http://example.com/?q=http%3A%2F%2Fexample.com%2F%3Fx%3D1%26q%3Ddjango')
def test_conditional_escape(self):
s = '<h1>interop</h1>'