Fix #5500 UnicodeEncodeError in atom feed
This simple fix allows unicode strings in the atom feed thumb and description fields by forcing the entire atom content string to unicode.
This commit is contained in:
parent
96f66a5fd4
commit
741c25fd67
@ -109,7 +109,7 @@ def atom_feed(request):
|
||||
# Include a thumbnail image in content.
|
||||
file_urls = get_media_file_paths(entry.media_files, request.urlgen)
|
||||
if 'thumb' in file_urls:
|
||||
content = '<img src="{thumb}" alt='' /> {desc}'.format(
|
||||
content = u'<img src="{thumb}" alt='' /> {desc}'.format(
|
||||
thumb=file_urls['thumb'], desc=entry.description_html)
|
||||
else:
|
||||
content = entry.description_html
|
||||
|
@ -574,7 +574,7 @@ def atom_feed(request):
|
||||
# Include a thumbnail image in content.
|
||||
file_urls = get_media_file_paths(entry.media_files, request.urlgen)
|
||||
if 'thumb' in file_urls:
|
||||
content = '<img src="{thumb}" alt='' /> {desc}'.format(
|
||||
content = u'<img src="{thumb}" alt='' /> {desc}'.format(
|
||||
thumb=file_urls['thumb'], desc=entry.description_html)
|
||||
else:
|
||||
content = entry.description_html
|
||||
|
Loading…
x
Reference in New Issue
Block a user