From 5d7a5a559d6c87c02ed606c6719b277702d7e46a Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 7 Dec 2020 10:49:05 -0500 Subject: [PATCH] Fix broken `redirect-rule=` priority parser Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1388 Regression from: - https://github.com/gorhill/uBlock/commit/cf2c638d8e953585651d8a31f3a67f19fbc62842 --- src/js/static-filtering-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index ccdfa506c..dd4ff1b8a 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1169,8 +1169,8 @@ const Parser = class { if ( asDataURI ) { token = token.slice(1); } const match = /:-?\d+$/.exec(token); if ( match !== null ) { - token = token.slice(0, match.index); priority = parseInt(token.slice(match.index + 1), 10); + token = token.slice(0, match.index); } return { token, priority, asDataURI }; }