MCPcopy Create free account
hub / github.com/microsoft/SandDance / attrText

Function attrText

docs/app/js/sanddance-app.js:123999–123999  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

123997}
123998const innerText = (val)=>(val + "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
123999const attrText = (val)=>innerText(val).replace(/"/g, "&quot;").replace(/\t/g, "&#x9;").replace(/\n/g, "&#xA;").replace(/\r/g, "&#xD;");
124000function markup() {
124001 let buf = "", outer = "", inner = "";
124002 const stack = [], clear = ()=>outer = inner = "", push = (tag)=>{

Callers 1

attr3Function · 0.70

Calls 2

replaceMethod · 0.80
innerTextFunction · 0.70

Tested by

no test coverage detected