@@ -109,14 +109,22 @@ def response(resp):
109109 else:
110110 url = build_flickr_url(photo['ownerNsid'], photo['id'])
111111
112− results.append({'url': url,
113− 'title': title,
114− 'img_src': img_src,
115− 'thumbnail_src': thumbnail_src,
116− 'content': content,
117− 'author': author,
118− 'source': source,
119− 'img_format': img_format,
120− 'template': 'images.html'})
112+ result = {
113+ 'url': url,
114+ 'img_src': img_src,
115+ 'thumbnail_src': thumbnail_src,
116+ 'source': source,
117+ 'img_format': img_format,
118+ 'template': 'images.html'
119+ }
120+ try:
121+ result['author'] = author.encode('utf-8')
122+ result['title'] = title.encode('utf-8')
123+ result['content'] = content.encode('utf-8')
124+ except:
125+ result['author'] = ''
126+ result['title'] = ''
127+ result['content'] = ''
128+ results.append(result)
121129
122130 return results