tarinai/js/ui_helpers.js

9 lines
322 B
JavaScript
Raw Normal View History

2026-06-22 02:03:19 +09:00
"use strict";
(function (global) {
function htmlEscape(value = "") {
return String(value ?? "").replace(/[&<>"']/g, ch => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", "\"": "&quot;", "'": "&#39;" }[ch] || ch));
}
2026-06-29 16:21:58 +09:00
global.TarinaiUIHelpers = { htmlEscape };
2026-06-22 02:03:19 +09:00
})(typeof window !== "undefined" ? window : globalThis);