fix email
This commit is contained in:
parent
77c938e8de
commit
9447d62c27
@ -64,10 +64,14 @@ def _ensure_html_blocks(s):
|
|||||||
else:
|
else:
|
||||||
parts = [p.strip() for p in s.split("\n\n") if p.strip()]
|
parts = [p.strip() for p in s.split("\n\n") if p.strip()]
|
||||||
if len(parts) > 1:
|
if len(parts) > 1:
|
||||||
body = "".join(f"<p>{html_lib.escape(p).replace('\n','<br>')}</p>" for p in parts)
|
body = "".join(
|
||||||
|
"<p>{}</p>".format(html_lib.escape(p).replace("\n", "<br>"))
|
||||||
|
for p in parts
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
body = "<p>" + html_lib.escape(s).replace("\n", "<br>") + "</p>"
|
body = "<p>{}</p>".format(html_lib.escape(s).replace("\n", "<br>"))
|
||||||
return f"<!doctype html><html><body>{body}</body></html>"
|
return "<!doctype html><html><body>{}</body></html>".format(body)
|
||||||
|
|
||||||
|
|
||||||
def _make_quoted_original(body_text):
|
def _make_quoted_original(body_text):
|
||||||
"""Crea il blocco citato del messaggio originale, safe-escaped."""
|
"""Crea il blocco citato del messaggio originale, safe-escaped."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user