posativ / acrylamid

(unmaintained) static blog generator in python with incremental rendering ⛺
http://posativ.org/acrylamid/
Other
277 stars 40 forks source link

Escape quotes in HTML attributes #197

Closed geekman closed 10 years ago

geekman commented 10 years ago

Quotes in HTML attributes are not quoted, thereby causing the HTMLParser to ignore the remaining part of the document. This bug was found due to a Python-Markdown parsing bug I've filed here.

The bug only happens when more than one filter that uses HTMLParser is chained. The input HTML is <img ... title="&quot;title" /> and after one round of parsing it becomes <img ... title=""title" /> and this input to the next filter will result in (silent) truncation due to invalid HTML.