mirror of
https://github.com/knadh/listmonk.git
synced 2025-11-08 08:41:34 +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', {
|
||||
data: {},
|
||||
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