diff roundup/cgi/templating.py @ 3102:427e3aee2113 maint-0.7

quote full-text search text in URL generation
author Richard Jones <richard@users.sourceforge.net>
date Thu, 13 Jan 2005 05:13:54 +0000
parents f175dcd1ad47
children fa200651d4c6
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Jan 13 04:44:15 2005 +0000
+++ b/roundup/cgi/templating.py	Thu Jan 13 05:13:54 2005 +0000
@@ -1993,6 +1993,7 @@
     def indexargs_url(self, url, args):
         ''' Embed the current index args in a URL
         '''
+        q = urllib.quote
         sc = self.special_char
         l = ['%s=%s'%(k,v) for k,v in args.items()]
 
@@ -2020,7 +2021,7 @@
         if self.filter and not specials.has_key('filter'):
             l.append(sc+'filter=%s'%(','.join(self.filter)))
         if self.search_text and not specials.has_key('search_text'):
-            l.append(sc+'search_text=%s'%self.search_text)
+            l.append(sc+'search_text=%s'%q(self.search_text))
         if not specials.has_key('pagesize'):
             l.append(sc+'pagesize=%s'%self.pagesize)
         if not specials.has_key('startwith'):
@@ -2029,7 +2030,6 @@
         # finally, the remainder of the filter args in the request
         if self.classname and self.filterspec:
             props = self.client.db.getclass(self.classname).getprops()
-            q = urllib.quote
             for k,v in self.filterspec.items():
                 if not args.has_key(k):
                     if type(v) == type([]):

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