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

Function htmlEscape

mini-code-edit/cm/lib/codemirror.js:2990–2993  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

2988
2989 var escapeElement = document.createElement("pre");
2990 function htmlEscape(str) {
2991 escapeElement.textContent = str;
2992 return escapeElement.innerHTML;
2993 }
2994 // Recent (late 2011) Opera betas insert bogus newlines at the start
2995 // of the textContent, so we strip those.
2996 if (htmlEscape("a") == "\na")

Callers 2

span_Function · 0.70
codemirror.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected