misc: makes sure we get a string even if sanitizehtml is not present

This commit is contained in:
Frédéric Péters 2015-01-19 18:05:39 +01:00
parent 3f5d2292e9
commit a19366b1b0
1 changed files with 1 additions and 1 deletions

View File

@ -1156,7 +1156,7 @@ class WysiwygTextWidget(TextWidget):
if _sanitizeHTML:
self.value = _sanitizeHTML(self.value, get_request().charset, 'text/html')
else:
self.value = htmlescape(self.value)
self.value = str(htmlescape(self.value))
if self.value.startswith('<br />'):
self.value = self.value[6:]
if self.value.endswith('<br />'):