MCPcopy Index your code
hub / github.com/nwutils/nw-sample-apps / htmlEscape

Function htmlEscape

mini-code-edit/cm/test/test.js:284–286  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

282// Scaffolding
283
284function htmlEscape(str) {
285 return str.replace(/[<&]/g, function(str) {return str == "&" ? "&amp;" : "&lt;";});
286}
287function forEach(arr, f) {
288 for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);
289}

Callers 1

runTestsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected