From 42a7cfced3844f3384caa3189c548ba2102b469a Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 18 Nov 2022 10:10:47 -0500 Subject: [PATCH] Use already available stringified character code Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2372 --- src/js/static-filtering-parser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 31120278b..3d3dcd950 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -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;