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

Function escapeHtml

example/tests/gm_xhr_test.js:412–417  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

410 }
411
412 function escapeHtml(s) {
413 return String(s).replace(
414 /[&<>"']/g,
415 (m) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[m]
416 );
417 }
418
419 function gmRequest(details, { abortAfterMs } = {}) {
420 return new Promise((resolve, reject) => {

Callers 4

passFunction · 0.70
failFunction · 0.70
skipFunction · 0.70
runAllFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected