comparison src/plugins/plugin_xep_0277.py @ 851:a8260ee88708

plugin XEP-0277: encoding fix
author Goffi <goffi@goffi.org>
date Thu, 20 Feb 2014 13:28:09 +0100
parents 8829a6c0b070
children 762b191e1e1e
comparison
equal deleted inserted replaced
850:30fd34309949 851:a8260ee88708
244 244
245 _entry.author = atom.Author() 245 _entry.author = atom.Author()
246 _entry.author.name = data.get('author', self.host.getJidNStream(profile)[0].userhost()).encode('utf-8') 246 _entry.author.name = data.get('author', self.host.getJidNStream(profile)[0].userhost()).encode('utf-8')
247 _entry.updated = float(data.get('updated', time())) 247 _entry.updated = float(data.get('updated', time()))
248 _entry.published = float(data.get('published', time())) 248 _entry.published = float(data.get('published', time()))
249 entry_id = data.get('id', str(_uuid)) 249 entry_id = data.get('id', unicode(_uuid))
250 _entry.id = entry_id 250 _entry.id = entry_id.encode('utf-8')
251 if 'comments' in data: 251 if 'comments' in data:
252 link = atom.Link() 252 link = atom.Link()
253 link.attrs['href'] = data['comments'] 253 link.attrs['href'] = data['comments']
254 link.attrs['rel'] = 'replies' 254 link.attrs['rel'] = 'replies'
255 link.attrs['title'] = 'comments' 255 link.attrs['title'] = 'comments'