Download node_modules/jquery/src/selector/escapeSelector.js from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 773 Bytes
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/selector/escapeSelector.js
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/node_modules/jquery/src/selector/escapeSelector.js
-
curl -L -o escapeSelector.js https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/selector/escapeSelector.js
773 Bytes
| define( [ | |
| "../core" | |
| ], function( jQuery ) { | |
| ; | |
| // CSS string/identifier serialization | |
| // https://drafts.csswg.org/cssom/#common-serializing-idioms | |
| var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; | |
| function fcssescape( ch, asCodePoint ) { | |
| if ( asCodePoint ) { | |
| // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER | |
| if ( ch === "\0" ) { | |
| return "\uFFFD"; | |
| } | |
| // Control characters and (dependent upon position) numbers get escaped as code points | |
| return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; | |
| } | |
| // Other potentially-special ASCII characters get backslash-escaped | |
| return "\\" + ch; | |
| } | |
| jQuery.escapeSelector = function( sel ) { | |
| return ( sel + "" ).replace( rcssescape, fcssescape ); | |
| }; | |
| } ); | |