diff options
author | Andrew Browning <ayleph@thisshitistemp.com> | 2017-02-14 01:01:48 -0500 |
---|---|---|
committer | Andrew Browning <ayleph@thisshitistemp.com> | 2017-02-14 01:03:25 -0500 |
commit | 741c25fd678a130fddeccf5be10d5e168575ab07 (patch) | |
tree | 830555d7cbbfade1aaff22a750d5015dd5b5e778 /mediagoblin/user_pages | |
parent | 96f66a5fd410d05e22a4945b6d4aa7417d0e1ec3 (diff) | |
download | mediagoblin-741c25fd678a130fddeccf5be10d5e168575ab07.tar.lz mediagoblin-741c25fd678a130fddeccf5be10d5e168575ab07.tar.xz mediagoblin-741c25fd678a130fddeccf5be10d5e168575ab07.zip |
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.
Diffstat (limited to 'mediagoblin/user_pages')
-rw-r--r-- | mediagoblin/user_pages/views.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index eaae1bd7..484d27cd 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -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 |