diff --git a/main.js b/main.js
index 32fc338..e035664 100644
--- a/main.js
+++ b/main.js
@@ -2026,6 +2026,15 @@ function save()
}
}
+function escapeHtml(unsafe) {
+ return unsafe
+ .replace(/&/g, "&")
+ .replace(//g, ">")
+ .replace(/"/g, """)
+ .replace(/'/g, "'");
+ }
+
function applycolors()
{
if (!settings.colors)
@@ -2039,6 +2048,7 @@ function applycolors()
var result = [];
lines.every( (line, i) =>
{
+ line = escapeHtml(line);
if (line.startsWith("#"))
{
line = line.replace(/(#*)/g, "$1");
@@ -2076,6 +2086,10 @@ function applycolors()
line = line.replace(/(\[\[.*\]\])/g, "$1");
line = line.replace(/(\*\*.*\*\*)/g, "$1");
line = line.replace(/(\*.*\*)/g, "$1");
+
+ line = line.replace(/<\!/g, "<!");
+ line = line.replace(/\-\->/g, "-->");
+
result.push(line);
return true;
diff --git a/style.css b/style.css
index cf49c2d..11004e7 100644
--- a/style.css
+++ b/style.css
@@ -119,6 +119,7 @@ body::-webkit-scrollbar-thumb {
opacity: 1;
width: 90%;
color: black;
+ z-index: 2;
}
/* authent */