Commit 2539cd44 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: html viewer: keeps all link attributes

Do not remove relative url, as they are ofter use in img tag
parent 7849e4c8
Pipeline #13786 failed with stage
...@@ -178,14 +178,7 @@ ...@@ -178,14 +178,7 @@
len = len - 1; len = len - 1;
attribute = attribute_list[len].name; attribute = attribute_list[len].name;
if (whitelist.link_list[attribute]) { if (whitelist.link_list[attribute]) {
if (startsWithOneOf(current_node.getAttribute(attribute), link_len += 1;
['http://', 'https://', '//', 'data:'])) {
link_len += 1;
} else {
keepOnlyChildren(current_node);
already_dropped = true;
break;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment