MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / funescape

Function funescape

libs/jquery-3.5.1/jquery-2.2.4.js:687–699  ·  view source on GitHub ↗
( _, escaped, escapedWhitespace )

Source from the content-addressed store, hash-verified

685 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
686 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
687 funescape = function( _, escaped, escapedWhitespace ) {
688 var high = "0x" + escaped - 0x10000;
689 // NaN means non-codepoint
690 // Support: Firefox<24
691 // Workaround erroneous numeric interpretation of +"0x"
692 return high !== high || escapedWhitespace ?
693 escaped :
694 high < 0 ?
695 // BMP codepoint
696 String.fromCharCode( high + 0x10000 ) :
697 // Supplemental Plane codepoint (surrogate pair)
698 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
699 },
700
701 // Used for iframes
702 // See setDocument()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected