html2safehtml.py does not generate valid XHTML, and cannot be made to do so without post processing. I've written a subclass of HTML2SafeHTML that outputs XHTML fragments, and a test suite.
html2safexhtml.py
test_xhtml.py
Log in to post a comment.
html2safexhtml.py
test_xhtml.py