diff options
author | Waylan Limberg <waylan@gmail.com> | 2008-08-22 18:05:43 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2008-08-22 18:05:43 -0400 |
commit | 7aab75d64c94b525427bc792088da1e3e16936cc (patch) | |
tree | d859ee334535b1ce6dc5afbb8dcc861c3da81c0e /markdown.py | |
parent | 4a570659a462593261fd4037946ad681d12b804a (diff) | |
download | markdown-7aab75d64c94b525427bc792088da1e3e16936cc.tar.gz markdown-7aab75d64c94b525427bc792088da1e3e16936cc.tar.bz2 markdown-7aab75d64c94b525427bc792088da1e3e16936cc.zip |
Added special case for raw html in safe-mode. The escaped/replaced html is now wrapped in <p> tags so we have valid html.
Diffstat (limited to 'markdown.py')
-rwxr-xr-x | markdown.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/markdown.py b/markdown.py index fca4225..6bdeccb 100755 --- a/markdown.py +++ b/markdown.py @@ -911,8 +911,9 @@ class RawHtmlTextPostprocessor(TextPostprocessor): else: html = HTML_REMOVED_TEXT - text = text.replace("<p>%s</p>" % (HTML_PLACEHOLDER % i), - html + "\n") + if not self.safeMode: + text = text.replace("<p>%s</p>" % (HTML_PLACEHOLDER % i), + html + "\n") text = text.replace(HTML_PLACEHOLDER % i, html) return text |