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

Function funescape

2.0.3/Sizzle.js:140–152  ·  view source on GitHub ↗
(_, escaped, escapedWhitespace)

Source from the content-addressed store, hash-verified

138 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
139 runescape = new RegExp("\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig"),
140 funescape = function(_, escaped, escapedWhitespace) {
141 var high = "0x" + escaped - 0x10000;
142 // NaN means non-codepoint
143 // Support: Firefox
144 // Workaround erroneous numeric interpretation of +"0x"
145 return high !== high || escapedWhitespace ?
146 escaped :
147 // BMP codepoint
148 high < 0 ?
149 String.fromCharCode(high + 0x10000) :
150 // Supplemental Plane codepoint (surrogate pair)
151 String.fromCharCode(high >> 10 | 0xD800, high & 0x3FF | 0xDC00);
152 };
153
154 // Optimize for push.apply( _, NodeList )
155 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected