1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:57:58 +01:00

replace & with the HTML entity in escapeHTML

This commit is contained in:
Doug Kearns
2007-10-26 04:48:28 +00:00
parent c2a02ccd6d
commit d192304759

View File

@@ -35,7 +35,7 @@ vimperator.util = {
// var e = window.content.document.createElement("div");
// e.appendChild(window.content.document.createTextNode(str));
// return e.innerHTML;
return str.replace(/</, "&lt;").replace(/>/, "&gt;");
return str.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
},
// TODO: use :highlight color groups