diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2018-03-22 09:07:28 +0100 |
|---|---|---|
| committer | Nicolas Martinelli <nim-odoo@users.noreply.github.com> | 2018-03-22 10:52:45 +0100 |
| commit | 6b07bce0ec2c0dc1a308c94e476bf0409b59704b (patch) | |
| tree | 36c0bff66119ac288c51dcea5547bc13aebd8586 /addons/mail/static/src/js/utils.js | |
| parent | 875f849018a4ff34390e7b34f7f8753b449c0f6b (diff) | |
[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
Diffstat (limited to 'addons/mail/static/src/js/utils.js')
| -rw-r--r-- | addons/mail/static/src/js/utils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/utils.js b/addons/mail/static/src/js/utils.js index 22e9a51b9dd..8ece5ef5040 100644 --- a/addons/mail/static/src/js/utils.js +++ b/addons/mail/static/src/js/utils.js @@ -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(); |
