]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/media/js/wmd/showdown.js
Fixed WMD to correctly show < and > in preview for <code> text
[osqa.git] / forum / skins / default / media / js / wmd / showdown.js
index 73a12f2d89a7ea490dc525e988aca0b6a1dcb626..4054c4ef0335d127031dd7baf231dafb7bb2f72c 100644 (file)
@@ -114,6 +114,7 @@ this.makeHtml = function(text) {
 // _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
 // and <img> tags get encoded.
 //
+    text = html_sanitize(text, function(url) {return url;}, function(id) {return id;});
 
        // Clear the global hashes. If we don't clear these, you get conflicts
        // from other articles when generating a page which contains more than
@@ -166,6 +167,9 @@ this.makeHtml = function(text) {
        // attacklab: Restore tildes
        text = text.replace(/~T/g,"~");
 
+       text = text.replace(/&amp;lt;/g,"<");
+       text = text.replace(/&amp;gt;/g,">");
+
        return text;
 }