Commit a4c92f0a authored by Nicolas Delaby's avatar Nicolas Delaby

if parsers (HTMLParser, lxml.html.parser or BeautifulSoup) return unicode,...

if parsers (HTMLParser, lxml.html.parser or BeautifulSoup) return unicode, encode output into 'utf-8'


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41856 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3e9cdae1
......@@ -443,6 +443,8 @@ class SafeHTML:
# avoid breaking now.
# continue into the loop with repaired html
else:
if isinstance(orig, unicode):
orig = orig.encode('utf-8')
data.setData(orig)
break
return data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment