Allow template variables to start with an underscore (patch from Oberon
Faelord).
+Work around broken DOCTYPEs that confuse sgmllib.
+
- rawdog 2.12
Make rawdog work with Python 2.6 (reported by Roy Lanek).
# sgmllib handles "<br/>/" as a SHORTTAG; this workaround from
# feedparser.
html = re.sub(r'(\S)/>', r'\1 />', html)
+
+ # sgmllib is fragile with broken processing instructions (e.g.
+ # "<!doctype html!>"); just remove them all.
+ html = re.sub(r'<![^>]*>', '', html)
+
html = feedparser._resolveRelativeURIs(html, baseurl, "UTF-8", type)
p = feedparser._HTMLSanitizer("UTF-8", type)
p.feed(html)