From f095af212ee2b6009412a89fe17ae46860efd8df Mon Sep 17 00:00:00 2001 From: asmod3us <4sm0d3us@gmail.com> Date: Tue, 26 Feb 2013 16:06:18 +0100 Subject: [PATCH] Update plugin/markdown/markdown.js Use textContent instead of innerHTML to prevent encoding of certain characters in Markdown code blocks. --- plugin/markdown/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/markdown/markdown.js b/plugin/markdown/markdown.js index ae4d08b0..39e11687 100644 --- a/plugin/markdown/markdown.js +++ b/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;