hiidef/speedparser — Issue #2: lxml.clean cannot defang some raw text ("<3")
Author: jmoiron
Created: 2012-02-07 14:44:27+00:00
State: open

lxml.html.clean cannot clean some raw text (in titles, descriptions, etc); particularly, text that might look like html but isn't. The first case I noticed was the tag "

<3

" will fail with a ParserError('Document is empty'), which is likely an underlying libxml2 issue.

We cannot simply pass the text through, as "<3" will also raise this same error. Currently, there is a regression test "TestHeartParserError" which confirms this error in speedparser and confirms that feedparser will read this content.