diff roundup/cgi/templating.py @ 5061:d7a4eeb7f843

Issue2407750 Add missing call to urllib.quote Patch supplied by cedric_krier. Reviewed and applied by rouilj. "python run_tests.py -k 'not test_postgresql'" passed used for validation. Ran a demo.py run with some simple tests to index page. I don't have an explicit test to show that this patch fixes. However given the name of the function patched this looks likehowit should have been written originally.
author John Rouillard <rouilj@ieee.org>
date Sun, 08 May 2016 20:10:09 -0400
parents b69c5e763295
children 2ac11cc397eb
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Wed May 04 21:52:49 2016 +1000
+++ b/roundup/cgi/templating.py	Sun May 08 20:10:09 2016 -0400
@@ -2695,7 +2695,8 @@
         """
         q = urllib.quote
         sc = self.special_char
-        l = ['%s=%s'%(k,v) for k,v in args.items()]
+        l = ['%s=%s'%(k,isinstance(v, basestring) and q(v) or v)
+                for k,v in args.items()]
 
         # pull out the special values (prefixed by @ or :)
         specials = {}

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