Mercurial > libervia-backend
diff src/plugins/plugin_xep_0277.py @ 2322:310a454c8657
plugins invitation, XEP-0277: strip language, we don't want spaces
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 12 Jul 2017 19:05:33 +0200 |
parents | 972e33507609 |
children | f9580b4a105a |
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py Sun Jul 09 16:17:16 2017 +0200 +++ b/src/plugins/plugin_xep_0277.py Wed Jul 12 19:05:33 2017 +0200 @@ -192,7 +192,7 @@ # language try: - microblog_data[u'language'] = entry_elt[(C.NS_XML, u'lang')] + microblog_data[u'language'] = entry_elt[(C.NS_XML, u'lang')].strip() except KeyError: pass @@ -353,7 +353,7 @@ ## language ## if u'language' in data: - entry_elt[(C.NS_XML, u'lang')] = data[u'language'] + entry_elt[(C.NS_XML, u'lang')] = data[u'language'].strip() ## content and title ## synt = self.host.plugins["TEXT-SYNTAXES"]