Files
AtreidesAssetsFree/client/ui/escape.js
T

10 lines
316 B
JavaScript
Raw Permalink Normal View History

2026-10-29 11:57:29 +01:00
// Generated, do not edit. sha256:b6966cd87b9511be3b1677051299af34144f53d2923d0082003d5a66a5025eb3
const HTML_ENTITIES = Object.freeze({
'&': '&',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;',
});
export const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => HTML_ENTITIES[c]);