瀏覽代碼

Update plugin/markdown/markdown.js

Use textContent instead of innerHTML to prevent encoding of certain characters in Markdown code blocks.
asmod3us 11 年之前
父節點
當前提交
f095af212e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugin/markdown/markdown.js

+ 1 - 1
plugin/markdown/markdown.js

@@ -11,7 +11,7 @@
         var template = section.querySelector( 'script' );
 
         // strip leading whitespace so it isn't evaluated as code
-        var text = ( template || section ).innerHTML;
+        var text = ( template || section ).textContent;
 
         var leadingWs = text.match(/^\n?(\s*)/)[1].length,
             leadingTabs = text.match(/^\n?(\t*)/)[1].length;