comparison src/plugins/plugin_xep_0277.py @ 1791:1359ad0b37c2

reverted patch 3770d13776e8
author Goffi <goffi@goffi.org>
date Wed, 13 Jan 2016 13:11:20 +0100
parents 1fa50da8bfbe
children fed95a6c56f8
comparison
equal deleted inserted replaced
1790:bf7e468fe440 1791:1359ad0b37c2
174 if data_elt is None: 174 if data_elt is None:
175 raise failure.Failure(exceptions.DataError(u"XHML content not wrapped in a <div/> element, this is not standard !")) 175 raise failure.Failure(exceptions.DataError(u"XHML content not wrapped in a <div/> element, this is not standard !"))
176 if data_elt.uri != NS_XHTML: 176 if data_elt.uri != NS_XHTML:
177 raise failure.Failure(exceptions.DataError(_('Content of type XHTML must declare its namespace!'))) 177 raise failure.Failure(exceptions.DataError(_('Content of type XHTML must declare its namespace!')))
178 key = check_conflict(u'{}_xhtml'.format(elem.name)) 178 key = check_conflict(u'{}_xhtml'.format(elem.name))
179 179 data = data_elt.toXml()
180 # This is needed to avoid a successive encapsulation with a new <div>...</div>
181 # each time the item is modified (encapsulation is done in self.data2entry).
182 data = xml_tools.decapsulateDomishContent(data_elt)
183
184 microblog_data[key] = yield self.host.plugins["TEXT-SYNTAXES"].clean_xhtml(data) 180 microblog_data[key] = yield self.host.plugins["TEXT-SYNTAXES"].clean_xhtml(data)
185 else: 181 else:
186 key = check_conflict(elem.name) 182 key = check_conflict(elem.name)
187 microblog_data[key] = unicode(elem) 183 microblog_data[key] = unicode(elem)
188 184