diff test/test_templating.py @ 5156:882fa4d9bead

issue2550795: @dispname query args in page.html search links not valid html. Some queries with names that include spaces are not properly url encoded/quoted. I.E. a space should be replaced with %20. Fixes to allow a url_query method to be applied to HTMLStringProperty to properly quote string values passed as part of a url.
author John Rouillard <rouilj@ieee.org>
date Fri, 22 Jul 2016 15:48:57 -0400
parents e424987d294a
children ae2a5d1afdd5
line wrap: on
line diff
--- a/test/test_templating.py	Fri Jul 22 15:24:00 2016 -0400
+++ b/test/test_templating.py	Fri Jul 22 15:48:57 2016 -0400
@@ -104,6 +104,11 @@
         cls = HTMLClass(self.client, "issue")
         cls["nosy"]
 
+    def test_string_url_quote(self):
+        ''' test that urlquote quotes the string '''
+        p = StringHTMLProperty(self.client, 'test', '1', None, 'test', 'test string< foo@bar')
+        self.assertEqual(p.url_quote(), 'test%20string%3C%20foo%40bar')
+
     def test_url_match(self):
         '''Test the URL regular expression in StringHTMLProperty.
         '''

Roundup Issue Tracker: http://roundup-tracker.org/