1
0
Fork 0

Update plugin/markdown/markdown.js

Use textContent instead of innerHTML to prevent encoding of certain characters in Markdown code blocks.
This commit is contained in:
asmod3us 2013-02-26 16:06:18 +01:00
parent 7207122c75
commit f095af212e
1 changed files with 1 additions and 1 deletions

View File

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