From 9f063c717b7baf4b4e5e1aacbe31fef7ebb0489b Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 4 Mar 2021 06:19:44 -0500 Subject: [PATCH] Also CSS-escape tag name in element picker Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1519 --- src/js/scriptlets/epicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/scriptlets/epicker.js b/src/js/scriptlets/epicker.js index f6cd150e1..898882050 100644 --- a/src/js/scriptlets/epicker.js +++ b/src/js/scriptlets/epicker.js @@ -401,7 +401,7 @@ const cosmeticFilterFromElement = function(elem) { } // Tag name - const tagName = elem.localName; + const tagName = CSS.escape(elem.localName); // Use attributes if still no selector found. // https://github.com/gorhill/uBlock/issues/1901