mirror of
https://github.com/knadh/listmonk.git
synced 2025-11-10 09:41:39 +08:00
Fix Go tpl expressions breaking in Visual editor HTML.
Closes #2593. Closes #2499.
This commit is contained in:
parent
deb41f8d1c
commit
d4007d5148
1 changed files with 3 additions and 1 deletions
|
|
@ -65,7 +65,9 @@ export default {
|
||||||
iframe.contentWindow.EmailBuilder.render('visual-editor-container', {
|
iframe.contentWindow.EmailBuilder.render('visual-editor-container', {
|
||||||
data: {},
|
data: {},
|
||||||
onChange: (data, body) => {
|
onChange: (data, body) => {
|
||||||
this.$emit('change', { source: JSON.stringify(data), body });
|
// Hack to fix quotes in Go {{ templating }} in the HTML body.
|
||||||
|
const tpl = body.replace(/\{\{[^}]*\}\}/g, (match) => match.replace(/"/g, '"'));
|
||||||
|
this.$emit('change', { source: JSON.stringify(data), body: tpl });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue