diff --git a/models/models.go b/models/models.go index 87963ca0..eaf082e1 100644 --- a/models/models.go +++ b/models/models.go @@ -212,7 +212,7 @@ func (s SubscriberAttribs) Scan(src interface{}) error { func (c *Campaign) CompileTemplate(f template.FuncMap) error { // Compile the base template. t := regexpLinkTag.ReplaceAllString(c.TemplateBody, regexpLinkTagReplace) - t = regexpViewTag.ReplaceAllString(c.TemplateBody, regexpViewTagReplace) + t = regexpViewTag.ReplaceAllString(t, regexpViewTagReplace) baseTPL, err := template.New(BaseTpl).Funcs(f).Parse(t) if err != nil { return fmt.Errorf("error compiling base template: %v", err) @@ -220,7 +220,7 @@ func (c *Campaign) CompileTemplate(f template.FuncMap) error { // Compile the campaign message. t = regexpLinkTag.ReplaceAllString(c.Body, regexpLinkTagReplace) - t = regexpViewTag.ReplaceAllString(c.Body, regexpViewTagReplace) + t = regexpViewTag.ReplaceAllString(t, regexpViewTagReplace) msgTpl, err := template.New(ContentTpl).Funcs(f).Parse(t) if err != nil { return fmt.Errorf("error compiling message: %v", err) diff --git a/todo b/todo deleted file mode 100644 index 425a7802..00000000 --- a/todo +++ /dev/null @@ -1,6 +0,0 @@ -- Add quote support to Quill link feature so that Track function can be inserted -- Make {{ template }} a Regex check to account for spaces -- Add css inliner -- Duplicate mails to subscribers in multiple lists under one campaign? - -- HTML syntax highlighting \ No newline at end of file