Commit 07fbe8c3 authored by Nicolas Delaby's avatar Nicolas Delaby

Require xhtml as output when serializing repaired html.

It will help HTMLParser to parse broken documents.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38332 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 422610df
......@@ -379,7 +379,8 @@ class SafeHTML:
remove_comments=True)
repaired_html_tree = etree.HTML(orig, parser=lparser)
html_string = tostring(repaired_html_tree,
include_meta_content_type=True)
include_meta_content_type=True,
method='xml')
# avoid breaking now.
# continue into the loop with repaired html
else:
......
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