aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/postprocessors.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2012-01-18 23:56:56 -0500
committerWaylan Limberg <waylan@gmail.com>2012-01-18 23:56:56 -0500
commit481e50700e269f9a56337cd9fabc3b5251958d10 (patch)
tree269237d32923c6e5b86d3c6ebdf0cd4d1ea957e0 /markdown/postprocessors.py
parent01f4b8cdcf37e3e17e50dfbb51b49472f4b5dc95 (diff)
downloadmarkdown-481e50700e269f9a56337cd9fabc3b5251958d10.tar.gz
markdown-481e50700e269f9a56337cd9fabc3b5251958d10.tar.bz2
markdown-481e50700e269f9a56337cd9fabc3b5251958d10.zip
Fixed #59. Raw HTML parsing is no longer slow.
Replaced the unescape method I carlessly threw in the RawHtmlProcessor. Unfortunetly, this reintroduces the bug just fixed in commit 425fde141f17973aea0a3a85e44632fe18737996 Sigh!
Diffstat (limited to 'markdown/postprocessors.py')
-rw-r--r--markdown/postprocessors.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/markdown/postprocessors.py b/markdown/postprocessors.py
index 962728b..672953a 100644
--- a/markdown/postprocessors.py
+++ b/markdown/postprocessors.py
@@ -60,21 +60,10 @@ class RawHtmlPostprocessor(Postprocessor):
text = text.replace("<p>%s</p>" %
(self.markdown.htmlStash.get_placeholder(i)),
html + "\n")
- html = self.unescape(html)
text = text.replace(self.markdown.htmlStash.get_placeholder(i),
html)
return text
- def unescape(self, html):
- """ Unescape any markdown escaped text within inline html. """
- for k, v in self.markdown.treeprocessors['inline'].stashed_nodes.items():
- ph = util.INLINE_PLACEHOLDER % k
- try:
- html = html.replace(ph, '%s' % util.etree.tostring(v))
- except:
- html = html.replace(ph, '\%s' % v)
- return html
-
def escape(self, html):
""" Basic html escaping """
html = html.replace('&', '&amp;')
@@ -82,7 +71,6 @@ class RawHtmlPostprocessor(Postprocessor):
html = html.replace('>', '&gt;')
return html.replace('"', '&quot;')
-
def isblocklevel(self, html):
m = re.match(r'^\<\/?([^ ]+)', html)
if m: