From 7aab75d64c94b525427bc792088da1e3e16936cc Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 22 Aug 2008 18:05:43 -0400 Subject: Added special case for raw html in safe-mode. The escaped/replaced html is now wrapped in

tags so we have valid html. --- markdown.py | 5 +++-- 1 file 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("

%s

" % (HTML_PLACEHOLDER % i), - html + "\n") + if not self.safeMode: + text = text.replace("

%s

" % (HTML_PLACEHOLDER % i), + html + "\n") text = text.replace(HTML_PLACEHOLDER % i, html) return text -- cgit v1.2.3