Strip extra blank lines from rendered Flickr mail message

The Jinja control flow tags in the message template produced extra
blank lines at the top, bottom, and middle of the rendered message.
Strip the output and filter empty paragraphs so the copied message
pastes cleanly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-02-08 14:13:59 +00:00
parent 29b65e33a7
commit 32e81c2d93

View file

@ -814,7 +814,7 @@ def start() -> str:
subject = f"Request to use your photo of {name} on Wikipedia" subject = f"Request to use your photo of {name} on Wikipedia"
lines = msg.split("\n\n") lines = [line for line in msg.strip().split("\n\n") if line.strip()]
return flask.render_template( return flask.render_template(
"combined.html", "combined.html",