[FIX] mail: strip comments when inlining
When an unread message contains conditional html statements, clicking on the discuss tray icon produces a JS traceback. This is due to `node.tagName` being undefined. When inlining, there is no need for these comments. opw-1829641
This commit is contained in:
committed by
Nicolas Martinelli
parent
875f849018
commit
6b07bce0ec
@@ -92,6 +92,7 @@ function strip_html (node, transform_children) {
|
||||
|
||||
function inline (node, transform_children) {
|
||||
if (node.nodeType === 3) return node.data;
|
||||
if (node.nodeType === 8) return "";
|
||||
if (node.tagName === "BR") return " ";
|
||||
if (node.tagName.match(/^(A|P|DIV|PRE|BLOCKQUOTE)$/)) return transform_children();
|
||||
node.innerHTML = transform_children();
|
||||
|
||||
Reference in New Issue
Block a user