projects
/
reveal.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7207122
)
Update plugin/markdown/markdown.js
author
asmod3us
<4sm0d3us@gmail.com>
Tue, 26 Feb 2013 15:06:18 +0000
(16:06 +0100)
committer
asmod3us
<4sm0d3us@gmail.com>
Tue, 26 Feb 2013 15:06:18 +0000
(16:06 +0100)
Use textContent instead of innerHTML to prevent encoding of certain characters in Markdown code blocks.
plugin/markdown/markdown.js
patch
|
blob
|
history
diff --git
a/plugin/markdown/markdown.js
b/plugin/markdown/markdown.js
index ae4d08b0c602f0853899917c486eb001ca14d450..39e11687a5d582b8b3a7a163e0cbc14e57727493 100644
(file)
--- 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;