comparison src/server/blog.py @ 900:f82b97d9ca5f

server (blog): use unicode character for ellispsis in atom feed's microblog title
author Goffi <goffi@goffi.org>
date Fri, 25 Mar 2016 12:17:53 +0100
parents bc3a3e804a7a
children 0c0551967bdf
comparison
equal deleted inserted replaced
899:bc3a3e804a7a 900:f82b97d9ca5f
468 # Title 468 # Title
469 try: 469 try:
470 title = item['title'] 470 title = item['title']
471 except KeyError: 471 except KeyError:
472 # for microblog (without title), we use an abstract of content as title 472 # for microblog (without title), we use an abstract of content as title
473 title = u'{}...'.format(u' '.join(item['content'][:70].split())) 473 title = u'{}…'.format(u' '.join(item['content'][:70].split()))
474 entry_elt.addElement(u'title', content=title) 474 entry_elt.addElement(u'title', content=title)
475 475
476 # HTTP link 476 # HTTP link
477 http_link_elt = entry_elt.addElement(u'link') 477 http_link_elt = entry_elt.addElement(u'link')
478 http_link_elt['rel'] = u'alternate' 478 http_link_elt['rel'] = u'alternate'