Skip to content
Snippets Groups Projects
Commit 78b9bb43 authored by Hakim El Hattab's avatar Hakim El Hattab
Browse files

disable html entity escapes in showdown (cloes #153 & #152)

parent 73706ad0
Branches
No related tags found
No related merge requests found
......@@ -992,13 +992,16 @@ var _EncodeCode = function(text) {
// The point is that in code, these characters are literals,
// and lose their special Markdown meanings.
//
// Hakim: Escaping these causes issues in code blocks
// Encode all ampersands; HTML entities are not
// entities within a Markdown code span.
text = text.replace(/&/g,"&");
// text = text.replace(/&/g,"&");
// Do the angle bracket song and dance:
text = text.replace(/</g,"&lt;");
text = text.replace(/>/g,"&gt;");
// text = text.replace(/</g,"&lt;");
// text = text.replace(/>/g,"&gt;");
// Now, escape characters that are magic in Markdown:
text = escapeCharacters(text,"\*_{}[]\\",false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment