Replace void tag by full tag when loading the doc

This commit is contained in:
Dominique Da Silva 2019-11-17 15:28:10 +00:00
parent fb1e6525f4
commit 7c5896b0c9
2 changed files with 2 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -157,7 +157,7 @@
if (mode === 'mjml') { if (mode === 'mjml') {
var doc = document.createElement('mjml'); var doc = document.createElement('mjml');
doc.innerHTML = resource.editorData.mjml.replace(/<[/]?mjml>/g, ''); doc.innerHTML = resource.editorData.mjml.replace(/<[/]?mjml>/g, '').replace(/<([a-zA-Z-]+)\s([^>]*)\/>/g, "<$1 $2></$1>");
// Document head with title // Document head with title
var head = doc.getElementsByTagName('mj-head')[0]; var head = doc.getElementsByTagName('mj-head')[0];
@ -190,7 +190,6 @@
template: resource.editorData.template template: resource.editorData.template
} }
}; };
c.components = doc.outerHTML; c.components = doc.outerHTML;
} }