Allow override of HTML escaping in code blocks
This way, authors can use HTML for special formatting.
This commit is contained in:
parent
4d89687fde
commit
88eb0af776
1 changed files with 4 additions and 2 deletions
|
@ -11,8 +11,10 @@
|
|||
element.innerHTML = element.innerHTML.trim();
|
||||
}
|
||||
|
||||
// Now escape html
|
||||
// Now escape html unless prevented by author
|
||||
if( ! element.hasAttribute( 'data-noescape' )) {
|
||||
element.innerHTML = element.innerHTML.replace(/</g,"<").replace(/>/g,">");
|
||||
}
|
||||
|
||||
// re-highlight when focus is lost (for edited code)
|
||||
element.addEventListener( 'focusout', function( event ) {
|
||||
|
|
Loading…
Reference in a new issue