A CLI for scaffolding ATProto web applications

chore(templates): try a different escapeHtml implementation

besaid.zone 3e4e1e25 5245df6d

verified
+6 -6
+6 -6
templates/vanilla/src/main.js
··· 7 7 8 8 function escapeHtml(str) { 9 9 if (!str) return ""; 10 - return String(str) 11 - .replace(/&/g, "&amp;") 12 - .replace(/</g, "&lt;") 13 - .replace(/>/g, "&gt;") 14 - .replace(/"/g, "&quot;") 15 - .replace(/'/g, "&#039;"); 10 + return str 11 + .replaceAll("&", "&amp;") 12 + .replaceAll("<", "&lt;") 13 + .replaceAll(">", "&gt;") 14 + .replaceAll('"', "&quot;") 15 + .replaceAll("'", "&#039;"); 16 16 } 17 17 18 18 function formatStat(stat) {