Index: lib/abp2blocklist.js |
=================================================================== |
--- a/lib/abp2blocklist.js |
+++ b/lib/abp2blocklist.js |
@@ -320,40 +320,16 @@ |
trigger["unless-top-url"] = [trigger["url-filter"]]; |
if (trigger["url-filter-is-case-sensitive"]) |
trigger["top-url-filter-is-case-sensitive"] = true; |
} |
rules.push({trigger: trigger, action: {type: action}}); |
} |
-function hasNonASCI(obj) |
-{ |
- if (typeof obj == "string") |
- { |
- if (/[^\x00-\x7F]/.test(obj)) |
- return true; |
- } |
- |
- if (typeof obj == "object") |
- { |
- if (obj instanceof Array) |
- for (let item of obj) |
- if (hasNonASCI(item)) |
- return true; |
- |
- let names = Object.getOwnPropertyNames(obj); |
- for (let name of names) |
- if (hasNonASCI(obj[name])) |
- return true; |
- } |
- |
- return false; |
-} |
- |
function convertIDSelectorsToAttributeSelectors(selector) |
{ |
// First we figure out where all the IDs are |
let sep = ""; |
let start = null; |
let positions = []; |
for (let i = 0; i < selector.length; i++) |
{ |
@@ -539,10 +515,10 @@ |
{ |
convertFilterAddRules(rules, filter, "block", true, |
requestFilterExceptionDomains); |
} |
for (let filter of this.requestExceptions) |
convertFilterAddRules(rules, filter, "ignore-previous-rules", true); |
- return rules.filter(rule => !hasNonASCI(rule)); |
+ return rules; |
}; |