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 @@
len = len - 1;
attribute = attribute_list[len].name;
if (whitelist.link_list[attribute]) {
if (startsWithOneOf(current_node.getAttribute(attribute),
['http://', 'https://', '//', 'data:'])) {
link_len += 1;
} else {
keepOnlyChildren(current_node);
already_dropped = true;
break;
}
link_len += 1;
}
}
......
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