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:
1 parent
058b1959f9
commit
7e2cdef150
12 files changed
+163
-23
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user