Index: options.js |
=================================================================== |
--- a/options.js |
+++ b/options.js |
@@ -71,6 +71,7 @@ |
const addFilter = wrapper({type: "filters.add"}, "text"); |
const getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); |
const removeFilter = wrapper({type: "filters.remove"}, "text"); |
+const escapeCSS = wrapper({type: "utils.escapeCSS"}, "CSS"); |
const whitelistedDomainRegexp = /^@@\|\|([^/:]+)\^\$document$/; |
const statusMessages = new Map([ |
@@ -533,9 +534,14 @@ |
function removeFromListBox(boxId, text) |
{ |
let list = document.getElementById(boxId); |
- let selector = "option[value=" + CSS.escape(text) + "]"; |
- for (let option of list.querySelectorAll(selector)) |
- list.removeChild(option); |
+ // Edge does not support CSS.escape yet: |
+ // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/101410/ |
+ escapeCSS(text, escapedCSS => |
+ { |
+ let selector = "option[value=" + escapedCSS + "]"; |
+ for (let option of list.querySelectorAll(selector)) |
+ list.removeChild(option); |
+ }); |
} |
function addWhitelistDomain(event) |