Skip to content
Snippets Groups Projects
Commit 6b07bce0 authored by Nicolas Martinelli's avatar Nicolas Martinelli Committed by Nicolas Martinelli
Browse files

[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
parent 875f8490
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment