merge tls-sprint
authorsylvain.thenault@logilab.fr
Fri, 24 Apr 2009 19:46:40 +0200
branchtls-sprint
changeset 1483 1367efbcd6a5
parent 1482 93c613913912 (current diff)
parent 1480 d3e3d527daf5 (diff)
child 1484 183da3addf0e
merge
--- a/devtools/htmlparser.py	Fri Apr 24 19:46:21 2009 +0200
+++ b/devtools/htmlparser.py	Fri Apr 24 19:46:40 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):