From b649c19af95d0494aa2127eb2069d2a7f108ab72 Mon Sep 17 00:00:00 2001 From: Raymond Camden Date: Wed, 1 May 2013 14:44:53 -0500 Subject: Moved my code to auto escape html to the right place --- plugin/highlight/highlight.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugin/highlight') diff --git a/plugin/highlight/highlight.js b/plugin/highlight/highlight.js index 6756359..5a6ad90 100644 --- a/plugin/highlight/highlight.js +++ b/plugin/highlight/highlight.js @@ -11,6 +11,9 @@ element.innerHTML = element.innerHTML.trim(); } + // Now escape html + element.innerHTML = element.innerHTML.replace(//g,">"); + // re-highlight when focus is lost (for edited code) element.addEventListener( 'focusout', function( event ) { hljs.highlightBlock( event.currentTarget ); -- cgit v1.2.3