summaryrefslogtreecommitdiff
path: root/markdown/postprocessors.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/postprocessors.py')
-rw-r--r--markdown/postprocessors.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/markdown/postprocessors.py b/markdown/postprocessors.py
index cd32687..2e68cd9 100644
--- a/markdown/postprocessors.py
+++ b/markdown/postprocessors.py
@@ -69,7 +69,7 @@ class RawHtmlPostprocessor(Postprocessor):
""" Iterate over html stash and restore html. """
replacements = OrderedDict()
for i in range(self.md.htmlStash.html_counter):
- html = self.md.htmlStash.rawHtmlBlocks[i]
+ html = self.stash_to_string(self.md.htmlStash.rawHtmlBlocks[i])
if self.isblocklevel(html):
replacements["<p>{}</p>".format(
self.md.htmlStash.get_placeholder(i))] = html
@@ -95,6 +95,10 @@ class RawHtmlPostprocessor(Postprocessor):
return self.md.is_block_level(m.group(1))
return False
+ def stash_to_string(self, text):
+ """ Convert a stashed object to a string. """
+ return str(text)
+
class AndSubstitutePostprocessor(Postprocessor):
""" Restore valid entities """