Commit 2bd80a81 authored by Romain Courteaud's avatar Romain Courteaud

erp5_core: html viewer: do not drop empty element

They are often used to achieve surprising styling
parent 2e848aa5
...@@ -127,10 +127,6 @@ ...@@ -127,10 +127,6 @@
src: true, src: true,
srcset: true srcset: true
} }
},
emptylist = {
BR: true,
HR: true
}, },
blacklist = { blacklist = {
SCRIPT: true, SCRIPT: true,
...@@ -253,12 +249,6 @@ ...@@ -253,12 +249,6 @@
} }
} }
// Drop element if no text or link
if ((link_len === 0) && (!already_dropped) &&
(!current_node.textContent) &&
(!emptylist[current_node.nodeName])) {
current_node.parentNode.removeChild(current_node);
}
} }
} }
......
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