From d6ac0aeb4b00b7cae78b7f244f572558d6cb1328 Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Sat, 14 Nov 2026 18:25:13 +0100 Subject: [PATCH] fix(quick-261114-p5m): read tags across raw-text and comment ends in the mail URL check - unsafeMarkupAt runs the existing HTML reading, then a tag reading in which attribute quoting alone decides where a tag ends (NextIsNotRawText after raw-text start tags, comment openers blanked) - both readings share unsafeAttrs; existing refusals keep their message and snippet - svg/style end tag inside a quoted attribute is refused at check, save and send; README and docs/services/mail.md describe the second reading --- docs/services/mail.md | 2 +- modules/postcard/README.md | 2 +- modules/postcard/safety.go | 103 +++++++++++++++++++++++++++----- modules/postcard/safety_test.go | 7 +++ 4 files changed, 97 insertions(+), 17 deletions(-) diff --git a/docs/services/mail.md b/docs/services/mail.md index 36829de7..c9e90e21 100644 --- a/docs/services/mail.md +++ b/docs/services/mail.md @@ -155,7 +155,7 @@ fmt.Println(err != nil, len(driver.Messages())) postcard does not pick a locale: the caller passes the full name. A per-language version of a template is a file named after the template, a dash and the locale (`welcome-en.htm`, sent as `acme.blog::mail.welcome-en`). A name with its own file always renders that file. A name the catalog does not hold, of the form `