MCPcopy Create free account
hub / github.com/JsAaron/jQuery / funescape

Function funescape

2.1.1/test/jquery-2.1.1.js:693–705  ·  view source on GitHub ↗
( _, escaped, escapedWhitespace )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected