1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Use already available stringified character code

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2372
This commit is contained in:
Raymond Hill 2022-11-18 10:10:47 -05:00
parent 04b8d495b6
commit 42a7cfced3
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3061,7 +3061,8 @@ Parser.utils = Parser.prototype.utils = (( ) => {
return String.fromCharCode(first+2, last+2);
}
case 64: /* T_HEXCHAR, 'HexChar' */ {
return String.fromCharCode(parseInt(node.val.slice(1), 16));
if ( node.flags.Code === '01' ) { return '\x00'; }
return node.flags.Char;
}
case 128: /* T_SPECIAL, 'Special' */ {
const flags = node.flags;