diff --git a/s4-main.js b/s4-main.js index 84fb025..f9b266a 100644 --- a/s4-main.js +++ b/s4-main.js @@ -14,6 +14,11 @@ mypath = mypath.substring(0, mypath.lastIndexOf("?")); //alert("mypath="+mypath); } + function escapeChars(old) { + return old.replaceAll('"', '"') + .replaceAll("<", '<') + .replaceAll(">", '>'); + } function collectElementsByAttr(elm, attr, val) { var e = document.getElementsByTagName(elm); if (!e) return null; @@ -1042,7 +1047,7 @@ authtd = repltd.parentNode.getElementsByTagName("td")[0], author = authtd.querySelector("a.author").innerText, digest = txt.split("\n").splice(0, hoverTextLines).join("\n"); - return "[[ "+author+" ]]\n"+digest; + return escapeChars("[[ "+author+" ]]\n"+digest); } else return ""; }