MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / escHtml

Function escHtml

example/tests/gm_value_test.js:59–67  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

57 HELPERS
58 ══════════════════════════════════════════════════════════ */
59 function escHtml(s) {
60 return String(s).replace(/[&<>"']/g, ch => ({
61 '&': '&amp;',
62 '<': '&lt;',
63 '>': '&gt;',
64 '"': '&quot;',
65 "'": '&#39;',
66 }[ch]));
67 }
68
69 function fmtVal(v) {
70 return v === undefined

Callers 12

fmtValFunction · 0.85
doSetFunction · 0.85
doDelFunction · 0.85
registerAllListenersFunction · 0.85
iLogFunction · 0.85
buildIframeBodyFunction · 0.85
mLogFunction · 0.85
mRefreshKVFunction · 0.85
registerMainListenersFunction · 0.85
gm_value_test.jsFile · 0.85
appendLogFunction · 0.85
renderKVFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected