From 4b8a1d2c0d1a8c5107f3aef01597db78d2a2a5ce Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Thu, 26 Jun 2014 21:14:30 +0200 Subject: Fixed #22267 -- Fixed unquote/quote in smart_urlquote Thanks Md. Enzam Hossain for the report and initial patch, and Tim Graham for the review. --- tests/utils_tests/test_html.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/utils_tests') 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 = '

interop

' -- cgit v1.3