Skip to content

Commit 696a8fa

Browse files
author
Richard Jones
committed
quote full-text search text in URL generation
1 parent c5a408d commit 696a8fa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ are given with the most recent entry first.
55
Fixed:
66
- handle capitalisation of class names in text hyperlinking (sf bug
77
1101043)
8+
- quote full-text search text in URL generation
89

910

1011
2005-01-06 0.7.11

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,7 @@ def indexargs_form(self, columns=1, sort=1, group=1, filter=1,
19931993
def indexargs_url(self, url, args):
19941994
''' Embed the current index args in a URL
19951995
'''
1996+
q = urllib.quote
19961997
sc = self.special_char
19971998
l = ['%s=%s'%(k,v) for k,v in args.items()]
19981999

@@ -2020,7 +2021,7 @@ def indexargs_url(self, url, args):
20202021
if self.filter and not specials.has_key('filter'):
20212022
l.append(sc+'filter=%s'%(','.join(self.filter)))
20222023
if self.search_text and not specials.has_key('search_text'):
2023-
l.append(sc+'search_text=%s'%self.search_text)
2024+
l.append(sc+'search_text=%s'%q(self.search_text))
20242025
if not specials.has_key('pagesize'):
20252026
l.append(sc+'pagesize=%s'%self.pagesize)
20262027
if not specials.has_key('startwith'):
@@ -2029,7 +2030,6 @@ def indexargs_url(self, url, args):
20292030
# finally, the remainder of the filter args in the request
20302031
if self.classname and self.filterspec:
20312032
props = self.client.db.getclass(self.classname).getprops()
2032-
q = urllib.quote
20332033
for k,v in self.filterspec.items():
20342034
if not args.has_key(k):
20352035
if type(v) == type([]):

0 commit comments

Comments
 (0)