Skip to content

Commit 24452e4

Browse files
author
Alexander Smishlajev
committed
fix: HTMLRequest.dispname must be string,
otherwise rendering of "python:' - %s' % request.dispname" in issue.index.html fails with UnicodeEncodeError
1 parent c283ca9 commit 24452e4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

roundup/cgi/templating.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,13 +2207,10 @@ def _post_init(self):
22072207
self.startwith = int(self.form[name].value)
22082208

22092209
# dispname
2210-
self.dispname = None
22112210
if self.form.has_key('@dispname'):
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-
self.dispname = value.decode(self.client.charset)
2211+
self.dispname = self.form['@dispname'].value
2212+
else:
2213+
self.dispname = None
22172214

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

0 commit comments

Comments
 (0)