MCPcopy Create free account
hub / github.com/TruthHun/BookStack / funescape

Function funescape

static/jquery/1.12.4/jquery.js:721–733  ·  view source on GitHub ↗
( _, escaped, escapedWhitespace )

Source from the content-addressed store, hash-verified

719 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
720 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
721 funescape = function( _, escaped, escapedWhitespace ) {
722 var high = "0x" + escaped - 0x10000;
723 // NaN means non-codepoint
724 // Support: Firefox<24
725 // Workaround erroneous numeric interpretation of +"0x"
726 return high !== high || escapedWhitespace ?
727 escaped :
728 high < 0 ?
729 // BMP codepoint
730 String.fromCharCode( high + 0x10000 ) :
731 // Supplemental Plane codepoint (surrogate pair)
732 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
733 },
734
735 // Used for iframes
736 // See setDocument()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected