Commit 9f19b967 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

we can still have a possibility of getting UnicodeDecodeError exception if...

we can still have a possibility of getting UnicodeDecodeError exception if input HTML is broken (it even happens in OOo conversion output).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42146 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8f00fe3f
...@@ -427,7 +427,7 @@ class SafeHTML: ...@@ -427,7 +427,7 @@ class SafeHTML:
except IllegalHTML, inst: except IllegalHTML, inst:
data.setData(msg_pat % ("Error", str(inst))) data.setData(msg_pat % ("Error", str(inst)))
break break
except HTMLParseError: except (HTMLParseError, UnicodeDecodeError):
if repeat: if repeat:
raise # try to repair only on first pass raise # try to repair only on first pass
# ouch ! # ouch !
......
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