MCPcopy Index your code
hub / github.com/prototypejs/prototype / escape

Function escape

test/unit/static/js/mocha.js:3766–3777  ·  view source on GitHub ↗

* Escape the given `str`.

(str)

Source from the content-addressed store, hash-verified

3764 */
3765
3766function escape(str) {
3767 return str
3768 .replace(/\|/g, "||")
3769 .replace(/\n/g, "|n")
3770 .replace(/\r/g, "|r")
3771 .replace(/\[/g, "|[")
3772 .replace(/\]/g, "|]")
3773 .replace(/\u0085/g, "|x")
3774 .replace(/\u2028/g, "|l")
3775 .replace(/\u2029/g, "|p")
3776 .replace(/'/g, "|'");
3777}
3778
3779}); // module: reporters/teamcity.js
3780

Callers 7

HTMLFunction · 0.85
fragmentFunction · 0.85
TeamcityFunction · 0.85
testFunction · 0.85
tagFunction · 0.85
cdataFunction · 0.85
response.jsFile · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68