form: use force_str() on wysiwyg fields (#36515)
This commit is contained in:
parent
e45c19e794
commit
30a9d2d4c3
|
@ -1488,7 +1488,7 @@ class WysiwygTextWidget(TextWidget):
|
|||
parser = HTMLParser()
|
||||
charset = get_publisher().site_charset
|
||||
def unquote_django(matchobj):
|
||||
return parser.unescape(force_text(matchobj.group(0), charset)).encode(charset)
|
||||
return force_str(parser.unescape(force_text(matchobj.group(0), charset)))
|
||||
self.value = re.sub('{[{%](.*?)[%}]}', unquote_django, self.value)
|
||||
|
||||
def add_media(self):
|
||||
|
|
Loading…
Reference in New Issue