fix: clear all tags from the editor; escape captions in feed HTML (v2.14.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-10 15:37:35 -07:00
1 parent 058b1959f9
commit 7e2cdef150
12 files changed
+163 -23

No files matched your search

@@ -0,0 +1,27 @@
# v2.14.1: Clearing tags in the editor; captions escaped in feeds
Two bugs from the backlog (High), confirmed against the code at v2.14.0.
## Clearing tags
`routes/admin.py` (edit POST) passed `tags=tags if tags else None`, and
`notes.update_note` treats `None` as "unchanged", so an empty Tags field
kept the old tags although the form says "Leave blank to remove all tags".
It now passes the parsed list (possibly empty) whenever the form has a
`tags` field, and `None` only when it doesn't.
## Captions in feed HTML
The media `<img>` built for item HTML put the caption into `alt="…"`
unescaped in four places: `feeds/rss.py` (two), `feeds/atom.py` and
`feeds/json_feed.py`. A caption with `"`, `<` or `&` broke the markup. The
caption and the media URL are now `html.escape(..., quote=True)`d. The
Atom enclosure's `title` attribute was already escaped with `_escape_xml`
and is unchanged (escaping it again would double it).
## Verification
`tests/test_tags_and_captions.py` (4 tests, all failing before the fix):
caption escaped once in RSS, Atom (and the enclosure title not doubled) and
JSON Feed; the editor leaves tags alone without the field and clears them
with an empty one. Feed, admin, tag, public-route and media tests pass.