From 709238294ea83525e62476ce59d734c57c11fd3f Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 4 Mar 2022 18:14:55 +0100 Subject: fix setting of 'blocked-blocked<...>-' attributes and add tests --- content/policy_enforcing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content') 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)); } -- cgit v1.2.3