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

+2 -2
View File
@@ -465,5 +465,5 @@ def create_app(config=None):
# Package version (Semantic Versioning 2.0.0)
# See docs/standards/versioning-strategy.md for details
__version__ = "2.14.0"
__version_info__ = (2, 14, 0)
__version__ = "2.14.1"
__version_info__ = (2, 14, 1)
+3 -2
View File
@@ -16,6 +16,7 @@ Standards:
"""
# Standard library imports
from html import escape
from datetime import datetime, timezone
from typing import Optional
import xml.etree.ElementTree as ET
@@ -199,8 +200,8 @@ def generate_atom_streaming(
html_content += '<div class="media">'
for item in note.media:
media_url = f"{site_url}/media/{item['path']}"
caption = item.get('caption', '')
html_content += f'<img src="{media_url}" alt="{caption}" />'
caption = escape(item.get('caption') or '', quote=True) # v2.14.1
html_content += f'<img src="{escape(media_url, quote=True)}" alt="{caption}" />'
html_content += '</div>'
# Add text content below media
+3 -2
View File
@@ -16,6 +16,7 @@ Standards:
"""
# Standard library imports
from html import escape
from datetime import datetime, timezone
from typing import Optional, Dict, Any
import json
@@ -247,8 +248,8 @@ def _build_item_object(site_url: str, note: Note) -> Dict[str, Any]:
content_html += '<div class="media">'
for media_item in note.media:
media_url = f"{site_url}/media/{media_item['path']}"
caption = media_item.get('caption', '')
content_html += f'<img src="{media_url}" alt="{caption}" />'
caption = escape(media_item.get('caption') or '', quote=True) # v2.14.1
content_html += f'<img src="{escape(media_url, quote=True)}" alt="{caption}" />'
content_html += '</div>'
# Add text content below media
+5 -4
View File
@@ -20,6 +20,7 @@ Standards:
"""
# Standard library imports
from html import escape
from datetime import datetime, timezone
from typing import Optional
@@ -127,8 +128,8 @@ def generate_rss(
html_content += '<div class="media">'
for item in note.media:
media_url = f"{site_url}/media/{item['path']}"
caption = item.get('caption', '')
html_content += f'<img src="{media_url}" alt="{caption}" />'
caption = escape(item.get('caption') or '', quote=True) # v2.14.1
html_content += f'<img src="{escape(media_url, quote=True)}" alt="{caption}" />'
html_content += '</div>'
# Add text content below media
@@ -254,8 +255,8 @@ def generate_rss_streaming(
html_content += '<div class="media">'
for item in note.media:
media_url = f"{site_url}/media/{item['path']}"
caption = item.get('caption', '')
html_content += f'<img src="{media_url}" alt="{caption}" />'
caption = escape(item.get('caption') or '', quote=True) # v2.14.1
html_content += f'<img src="{escape(media_url, quote=True)}" alt="{caption}" />'
html_content += '</div>'
# Add text content below media
+3 -1
View File
@@ -309,7 +309,9 @@ def update_note_submit(note_id: int):
id=note_id,
content=content,
published=published,
tags=tags if tags else None
# An empty Tags field removes all tags (v2.14.1); a form without
# the field leaves them alone
tags=tags if "tags" in request.form else None
)
if "syndication_form" in request.form:
from starpunk.syndication import select_targets