# HG changeset patch # User Goffi # Date 1457557085 -3600 # Node ID fe4d8dfaaa654a8d3eb9409ccd421e719d1bb8f7 # Parent 12e0bfdfe9c6e892630abd85fab1c29e659642d8 blog: OK, OK, I forgot the _quote method, it's better now :) diff -r 12e0bfdfe9c6 -r fe4d8dfaaa65 src/server/blog.py --- a/src/server/blog.py Wed Mar 09 21:21:15 2016 +0100 +++ b/src/server/blog.py Wed Mar 09 21:58:05 2016 +0100 @@ -430,7 +430,7 @@ link_blog_elt['type'] = u'application/xmpp+xml' link_blog_elt['href'] = blog_xmpp_uri - feed_elt.addElement('id', content=urllib.quote(blog_xmpp_uri.encode('utf-8'))) + feed_elt.addElement('id', content=_quote(blog_xmpp_uri)) updated_unix = max([float(item['updated']) for item in items]) updated_dt = datetime.fromtimestamp(updated_unix) feed_elt.addElement(u'updated', u'{}Z'.format(updated_dt.isoformat("T"))) @@ -450,7 +450,7 @@ http_link_elt = entry_elt.addElement(u'link') http_link_elt['rel'] = u'alternate' http_link_elt['type'] = u'text/html' - http_link_elt['href'] = u'{base}/{quoted_id}'.format(base=base_blog_url, quoted_id=urllib.quote(item['id'].encode('utf-8'))) + http_link_elt['href'] = u'{base}/{quoted_id}'.format(base=base_blog_url, quoted_id=_quote(item['id'])) # XMPP link xmpp_link_elt = entry_elt.addElement(u'link') xmpp_link_elt['rel'] = u'alternate' @@ -574,7 +574,7 @@ # FIXME: that's really not a good way to get item id # this must be changed after static blog refactorisation item_id = items[0][0]['id'] - xmpp_uri+=u";item={}".format(urllib.quote(item_id.encode('utf-8'))) + xmpp_uri+=u";item={}".format(_quote(item_id)) data = {'url_base': base_url, 'xmpp_uri': xmpp_uri,