diff --git a/CHANGELOG.md b/CHANGELOG.md
index 46ec41e1..d8a80a6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -203,6 +203,19 @@ because it turns other people's test suites red.
Checker finds nothing wrong with it. With `nesting` the spaces grow with
every level, so `nesting` 1000 makes a page of at least 1.9 MB. Files made
with the earlier settings keep their bytes.
+- **EML: a newsletter.** `layout=newsletter` puts the text in the frame a
+ mailing list sends - a title, a Read more button and a footer with an
+ unsubscribe link, in a table 600 pixels wide styled both by a style sheet
+ and by style attributes - and the plain text writes out the addresses the HTML
+ puts behind its links. The message carries `List-Id`, `List-Unsubscribe`
+ with a `mailto:` and an `https` address, and `List-Unsubscribe-Post`, and
+ the manifest gives the address as `unsubscribe_url`. Python's email package
+ and mailparser read all three lines, and the Nu HTML Checker finds no error
+ in the frame, only the table attributes it calls obsolete. There is no
+ DKIM signature, so a mail
+ program that follows RFC 8058 offers no one-click unsubscribe. Nothing in
+ the frame is fetched when the message is opened. Messages made with the
+ earlier settings keep their bytes.
- **A length of time as a setting.** `duration`, `change_interval` and `keyframe_interval` take
`10s`, `1m30s`, `1h`, `500ms` or `59.9s`, to the millisecond. A bare number
is refused rather than read as seconds, and so is a length that does not
diff --git a/README.md b/README.md
index 9bec5ad7..092b23c0 100644
--- a/README.md
+++ b/README.md
@@ -632,7 +632,7 @@ recipe. `tfg formats ", " ", m.label, " ", eol)
fill(o, m.text, m.seed)
- o.put(eol, "
`,
+ `
|
\r\n"), []byte("
\r\n
\r\n"), 1) + }, "the HTML holds something a mail program fetches"}, + {newsletter, newsletter, func(b []byte) []byte { + return bytes.Replace(b, []byte(""), []byte("\r\n"), 1) + }, "the HTML holds something a mail program fetches"}, + {plainLetter, plainLetter, func(b []byte) []byte { + return bytes.Replace(b, []byte("Read more (https://example.com/newsletter)\r\n"), nil, 1) + }, "layout=newsletter and the plain text opens"}, + {newsletter, simple, func(b []byte) []byte { return listLines.ReplaceAll(b, nil) }, + "layout=simple and the text/plain part is in the frame of a newsletter"}, + {simple, newsletter, func(b []byte) []byte { return b }, "the message opens with"}, + // Review of #186: an address in the middle of the plain text went with + // every other word holding ://, and the HTML was asked only for src in + // double quotes. Each of these passed before. + {newsletter, newsletter, replaced("\r\n\r\nRead more (", "\r\nhttps://example.net/x\r\n\r\nRead more ("), + "the two parts of alternative do not carry the same words"}, + {newsletter, newsletter, replaced("
\r\n", "\r\n
\r\n"), fetches}, + {newsletter, newsletter, replaced(`
\r\n", "
\r\n"), fetches}, + {newsletter, newsletter, replaced("
\r\n", "\r\n
\r\n"), fetches}, + {newsletter, newsletter, replaced("", "\r\n"), fetches}, + {newsletter, newsletter, replaced("
\r\n", "
\r\n
\r\n"), fetches}, + // In the sheet rather than in an attribute, so only the reading of + // the styles sees them. And addresses with nothing to say they are + // remote, so only the rules for src and for link see them. + {newsletter, newsletter, replaced("", html[start:end]) if start >= 0 else None + return bool(sheet and re.search(r"\{[^}:]*:[^}]*\}", sheet.group(1))) + + +def eml_frame(text, s, unsubscribe): + """A text part in the frame layout orders: a newsletter's lines around the + plain text, and its page around the HTML - two tables of presentation 600 + wide, styles in a sheet and on its elements, the button and the link to + unsubscribe at the address List-Unsubscribe gives - and with simple none of + it. Nothing in any HTML may be fetched when it is opened.""" + body, lines = text["text"], text["text"].splitlines() + html = text["type"] == "text/html" + if html: + fetched = eml_fetched(body) + if fetched: + fail(f"the HTML holds something a mail program fetches on opening it: {fetched[:4]}") + framed = "Example Newsletter" in body or "
body |
alternative, html, plain | +||
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/cs/formaty/index.html b/web/public/cs/formaty/index.html
index 5729e5a0..3073ed83 100644
--- a/web/public/cs/formaty/index.html
+++ b/web/public/cs/formaty/index.html
@@ -517,6 +517,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/de/formate/index.html b/web/public/de/formate/index.html
index 577025a4..dc39ad17 100644
--- a/web/public/de/formate/index.html
+++ b/web/public/de/formate/index.html
@@ -519,6 +519,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/es/formatos/index.html b/web/public/es/formatos/index.html
index bb296e69..fbf5d8dd 100644
--- a/web/public/es/formatos/index.html
+++ b/web/public/es/formatos/index.html
@@ -520,6 +520,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/formats/index.html b/web/public/formats/index.html
index 43c99266..f06c469a 100644
--- a/web/public/formats/index.html
+++ b/web/public/formats/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/fr/formats/index.html b/web/public/fr/formats/index.html
index fcb88e86..b846147e 100644
--- a/web/public/fr/formats/index.html
+++ b/web/public/fr/formats/index.html
@@ -520,6 +520,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/hi/formats/index.html b/web/public/hi/formats/index.html
index 3c707385..3998d54d 100644
--- a/web/public/hi/formats/index.html
+++ b/web/public/hi/formats/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/id/format/index.html b/web/public/id/format/index.html
index 8f71b495..fff25d08 100644
--- a/web/public/id/format/index.html
+++ b/web/public/id/format/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/it/formati/index.html b/web/public/it/formati/index.html
index 8405e9f2..9d61fce1 100644
--- a/web/public/it/formati/index.html
+++ b/web/public/it/formati/index.html
@@ -520,6 +520,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/ja/formats/index.html b/web/public/ja/formats/index.html
index 961add9a..f0e6c3a0 100644
--- a/web/public/ja/formats/index.html
+++ b/web/public/ja/formats/index.html
@@ -510,6 +510,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/ko/formats/index.html b/web/public/ko/formats/index.html
index 98261b1c..9ad55ecf 100644
--- a/web/public/ko/formats/index.html
+++ b/web/public/ko/formats/index.html
@@ -511,6 +511,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/nl/formaten/index.html b/web/public/nl/formaten/index.html
index 11c9992d..c250d796 100644
--- a/web/public/nl/formaten/index.html
+++ b/web/public/nl/formaten/index.html
@@ -520,6 +520,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/pl/formaty/index.html b/web/public/pl/formaty/index.html
index 3b619c65..28bcc1b8 100644
--- a/web/public/pl/formaty/index.html
+++ b/web/public/pl/formaty/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/pt-br/formatos/index.html b/web/public/pt-br/formatos/index.html
index 6637d2c8..aadaf4ed 100644
--- a/web/public/pt-br/formatos/index.html
+++ b/web/public/pt-br/formatos/index.html
@@ -519,6 +519,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/ro/formate/index.html b/web/public/ro/formate/index.html
index 4a5c6211..45669e0d 100644
--- a/web/public/ro/formate/index.html
+++ b/web/public/ro/formate/index.html
@@ -519,6 +519,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/ru/formats/index.html b/web/public/ru/formats/index.html
index fcf6d020..fcdc1f8b 100644
--- a/web/public/ru/formats/index.html
+++ b/web/public/ru/formats/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/th/formats/index.html b/web/public/th/formats/index.html
index 69c059ad..1522e139 100644
--- a/web/public/th/formats/index.html
+++ b/web/public/th/formats/index.html
@@ -516,6 +516,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/tr/bicimler/index.html b/web/public/tr/bicimler/index.html
index 1c08fdad..7a76c16b 100644
--- a/web/public/tr/bicimler/index.html
+++ b/web/public/tr/bicimler/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/uk/formats/index.html b/web/public/uk/formats/index.html
index a31cf03b..75912a33 100644
--- a/web/public/uk/formats/index.html
+++ b/web/public/uk/formats/index.html
@@ -518,6 +518,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/vi/dinh-dang/index.html b/web/public/vi/dinh-dang/index.html
index 66c7979e..9a525c21 100644
--- a/web/public/vi/dinh-dang/index.html
+++ b/web/public/vi/dinh-dang/index.html
@@ -516,6 +516,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/zh-hans/formats/index.html b/web/public/zh-hans/formats/index.html
index c336447c..4e1ba76f 100644
--- a/web/public/zh-hans/formats/index.html
+++ b/web/public/zh-hans/formats/index.html
@@ -510,6 +510,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |
diff --git a/web/public/zh-hant/formats/index.html b/web/public/zh-hant/formats/index.html
index e9cf30f8..2b43d38c 100644
--- a/web/public/zh-hant/formats/index.html
+++ b/web/public/zh-hant/formats/index.html
@@ -510,6 +510,11 @@ body |
alternative, html, plain | |
| + | layout |
+ newsletter, simple | +|
text_encoding |