diff -r b056a49c16dc -r d3e3d527daf5 devtools/htmlparser.py --- a/devtools/htmlparser.py Fri Apr 24 17:04:14 2009 +0200 +++ b/devtools/htmlparser.py Fri Apr 24 18:53:12 2009 +0200 @@ -32,10 +32,10 @@ def preprocess_data(self, data): """used to fix potential blockquote mess generated by docutils""" - if STRICT_DOCTYPE not in data: + if str(STRICT_DOCTYPE) not in data: return data # parse using transitional DTD - data = data.replace(STRICT_DOCTYPE, TRANSITIONAL_DOCTYPE) + data = data.replace(str(STRICT_DOCTYPE), str(TRANSITIONAL_DOCTYPE)) tree = etree.fromstring(data, self.parser) namespace = tree.nsmap.get(None) # this is the list of authorized child tags for
nodes @@ -51,7 +51,7 @@ parent = blockquote.getparent() parent.remove(blockquote) data = etree.tostring(tree) - return '%s\n%s' % (STRICT_DOCTYPE, data) + return '%s\n%s' % (str(STRICT_DOCTYPE), data) class SaxOnlyValidator(Validator):