--- 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 <blockquote> nodes
@@ -51,7 +51,7 @@
parent = blockquote.getparent()
parent.remove(blockquote)
data = etree.tostring(tree)
- return '<?xml version="1.0" encoding="UTF-8"?>%s\n%s' % (STRICT_DOCTYPE, data)
+ return '<?xml version="1.0" encoding="UTF-8"?>%s\n%s' % (str(STRICT_DOCTYPE), data)
class SaxOnlyValidator(Validator):