R2: Add escapeHtml to app.js for models/irs pages

This commit is contained in:
2026-06-12 14:17:24 -04:00
parent 77a757cee6
commit 737b123994
+9
View File
@@ -5,6 +5,15 @@
* and provides REST helper functions used by all pages.
*/
/* ── XSS-safe string helper ───────────────────────────────────────── */
function escapeHtml(text) {
if (text == null) return '';
const div = document.createElement('div');
div.appendChild(document.createTextNode(String(text)));
return div.innerHTML;
}
/* ── REST helpers ───────────────────────────────────────────────── */
async function apiGet(path) {