Mercurial > p > roundup > code
diff roundup/cgi/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 | 153833fe124f |
| children | 232c74973a56 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Fri Jul 22 15:24:00 2016 -0400 +++ b/roundup/cgi/templating.py Fri Jul 22 15:48:57 2016 -0400 @@ -1399,6 +1399,10 @@ # just return the matched text return match.group(0) + def url_quote(self): + """ Return the string in plain format but escaped for use in a url """ + return urllib.quote(self.plain()) + def hyperlinked(self): """ Render a "hyperlinked" version of the text """ return self.plain(hyperlink=1)
