mirror of
https://github.com/knadh/listmonk.git
synced 2025-12-05 16:00:03 +01:00
Fix Go tpl expressions breaking in Visual editor HTML.
Closes #2593. Closes #2499.
This commit is contained in:
@@ -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 });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user