Skip to content
Snippets Groups Projects
Commit 630c4ad9 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[source-highlight script] Fix bug in HTML-escaping

parent 5581979d
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ function ensureMode(name) {
ensureMode(modeName);
function esc(str) {
return str.replace(/[<&]/, function(ch) { return ch == "&" ? "&amp;" : "&lt;"; });
return str.replace(/[<&]/g, function(ch) { return ch == "&" ? "&amp;" : "&lt;"; });
}
var code = fs.readFileSync("/dev/stdin", "utf8");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment