Thread
:
Bad DOCTYPE declaration causes BS to crash
View Single Post
09-03-2011, 07:44 PM
#
2
kovidgoyal
creator of calibre
Posts: 45,592
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Try this
preprocess_regexps= [(re.compile(r'<!DOCTYPE[^>]+>', re.I), '')]
and note that you can also define preprocess_raw_html() i your recipe to remove the doctype programmitacally if you have trouble with regeps.
kovidgoyal
View Public Profile
Visit kovidgoyal's homepage!
Find More Posts by kovidgoyal
Track Posts by kovidgoyal via RSS