selection update

This commit is contained in:
2026-06-30 21:31:35 +02:00
parent 594c4c674d
commit c4300b0416
10 changed files with 402 additions and 91 deletions
+10
View File
@@ -0,0 +1,10 @@
export function escapeChar(c) {
if (c === "&") return "&";
if (c === "<") return "&lt;";
if (c === ">") return "&gt;";
return c;
}
export function escapeHtml(s) {
return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
}