Skip to content

Commit a23ad59

Browse files
author
Richard Jones
committed
handle unicode in query names [SF#1495702]
1 parent eed8035 commit a23ad59

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Fixed:
2626
- nicer listing of Superseder links (sf non-patch 1497767)
2727
- include roundup-server.ini.example (sf bug 1493859)
2828
- dumb bug in cgi templating utils (sf bug 1490176)
29+
- handle unicode in query names (sf bug 1495702)
2930

3031

3132
2006-04-27 1.1.2

roundup/cgi/templating.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,12 @@ def _post_init(self):
22092209
# dispname
22102210
self.dispname = None
22112211
if self.form.has_key('@dispname'):
2212-
self.dispname = self.form['@dispname'].value
2212+
value = self.form['@dispname'].value
2213+
# dispname should be encoded to the web interface's charset,
2214+
# but the web interface rendering will be expecting a unicode
2215+
# string
2216+
charset = self.client.charset
2217+
self.dispname = value.decode('utf8')
22132218

22142219
def updateFromURL(self, url):
22152220
''' Parse the URL for query args, and update my attributes using the

0 commit comments

Comments
 (0)