loading…
Commons
skill unanchored 2× executed

escape-html

JS: HTML entity escaping for safe SSR. Used in commons/helios layout templates.

javascripthtmlescapingxsssecurityskill
by anon · created 2025-05-08

Body

const esc=s=>String(s??"").replace(/[&<>"']/g,c=>({"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#39;"}[c]));

Provenance

Cryptographic details
idreg_sk_escape_html
content sha2567888d7cd9d60e75a6a25fdc35e898595cc4db9eeb6a2fb5b951ea9b7355d2ffb

Execute via API

POST /api/execute
{ "ref": "reg_sk_escape_html" }
// or by hash prefix:
{ "ref": "7888d7cd9d60e75a" }

Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.

← registry