aboutsummaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-04 18:14:55 +0100
committerWojtek Kosior <koszko@koszko.org>2022-03-04 18:14:55 +0100
commit709238294ea83525e62476ce59d734c57c11fd3f (patch)
tree206671384cb5eba3ea9a26e2870b063c6910f55c /content
parent33b6872c33ec2a68ac5abda6eb0de23fc9d9fdaa (diff)
downloadbrowser-extension-709238294ea83525e62476ce59d734c57c11fd3f.tar.gz
browser-extension-709238294ea83525e62476ce59d734c57c11fd3f.zip
fix setting of 'blocked-blocked<...>-<name>' attributes and add tests
Diffstat (limited to 'content')
-rw-r--r--content/policy_enforcing.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/policy_enforcing.js b/content/policy_enforcing.js
index 0bbe3c6..29990b8 100644
--- a/content/policy_enforcing.js
+++ b/content/policy_enforcing.js
@@ -118,12 +118,12 @@ function block_attribute(node, attr, ns=null, replace_with=null) {
* relatively easily accessed in case they contain some useful data.
*/
const construct_name = [attr];
- while (hasa(node, construct_name.join("")))
+ while (hasa(node, construct_name.join("-")))
construct_name.unshift(blocked_str);
while (construct_name.length > 1) {
construct_name.shift();
- const name = construct_name.join("");
+ const name = construct_name.join("-");
seta(node, `${blocked_str}-${name}`, geta(node, name));
}