This is a test article with a link.
This is a test article with a link.
", "", "", "
", "", ""} + for _, tag := range htmlTags { + if strings.Contains(textOutput, tag) { + t.Errorf("Text output contains HTML tag %q - should be stripped", tag) + } + } + + // Verify the actual text content is present + if !strings.Contains(textOutput, "This is a test article with a link") { + t.Error("Text content was not preserved after HTML stripping") + } +} diff --git a/email/templates/digest.txt b/email/templates/digest.txt index 1d976eb..98ec2ac 100644 --- a/email/templates/digest.txt +++ b/email/templates/digest.txt @@ -14,9 +14,9 @@ Summary {{range .Items}} {{.Title}} {{.Link}} -{{if and $.Inline .Content}} +{{if and $.Inline .PlainContent}} -{{.Content}} +{{.PlainContent}} {{end}} {{end}} {{end}}