Permalink
Browse files

Use original HTMLParser from v2.7.3 if no patched version is available.

  • Loading branch information...
1 parent f3e8093 commit 1fb253fb563249474b50e94c57d58af643dc1550 @jedie committed Jun 11, 2012
Showing with 494 additions and 93 deletions.
  1. +4 −4 creole/html_parser/parser.py
  2. +475 −0 creole/shared/HTMLParsercompat.py
  3. +15 −89 creole/shared/html_parser.py
@@ -20,7 +20,7 @@
from creole.html_tools.strip_html import strip_html
from creole.py3compat import TEXT_TYPE, BINARY_TYPE
from creole.shared.document_tree import DocNode, DebugList
-from creole.shared.html_parser import HTMLParser2
+from creole.shared.html_parser import HTMLParser
#------------------------------------------------------------------------------
@@ -47,7 +47,7 @@
#------------------------------------------------------------------------------
-class HtmlParser(HTMLParser2):
+class HtmlParser(HTMLParser):
"""
parse html code and create a document tree.
@@ -85,7 +85,7 @@ class HtmlParser(HTMLParser2):
_inline_placeholder = "inlinedata"
def __init__(self, debug=False):
- HTMLParser2.__init__(self)
+ HTMLParser.__init__(self)
self.debugging = debug
if self.debugging:
@@ -156,7 +156,7 @@ def feed(self, raw_data):
# print(clean_data.replace(">", ">\n"))
# print("-"*79)
- HTMLParser2.feed(self, data)
+ HTMLParser.feed(self, data)
return self.root
Oops, something went wrong.

0 comments on commit 1fb253f

Please sign in to comment.