Permalink
Browse files

Fix for patched HTML parser when running on distro Python builds

  • Loading branch information...
1 parent 16d2cab commit 52276cc5c9cf9503e1b0264a7a4ae124701fe4db @mattbasta committed Feb 15, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 appvalidator/testcases/markup/patchedhtmlparser.py
View
4 appvalidator/testcases/markup/patchedhtmlparser.py
@@ -3,6 +3,8 @@
except ImportError: # pragma: no cover
import html.parser as htmlparser
+interesting_cdata = re.compile(r'<(/|\Z)')
+
class PatchedHTMLParser(htmlparser.HTMLParser):
"""
@@ -89,5 +91,5 @@ def parse_endtag(self, i):
return j
def set_cdata_mode(self, tag):
- self.interesting = htmlparser.interesting_cdata
+ self.interesting = interesting_cdata
self.cdata_tag = None

0 comments on commit 52276cc

Please sign in to comment.