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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user