# HG changeset patch # User Goffi # Date 1452687080 -3600 # Node ID 1359ad0b37c280a87469b43441be9830c2cd0723 # Parent bf7e468fe4403fe0dba1a575e175922af3d93536 reverted patch 3770d13776e8 diff -r bf7e468fe440 -r 1359ad0b37c2 src/plugins/plugin_xep_0277.py --- a/src/plugins/plugin_xep_0277.py Wed Jan 13 13:08:31 2016 +0100 +++ b/src/plugins/plugin_xep_0277.py Wed Jan 13 13:11:20 2016 +0100 @@ -176,11 +176,7 @@ if data_elt.uri != NS_XHTML: raise failure.Failure(exceptions.DataError(_('Content of type XHTML must declare its namespace!'))) key = check_conflict(u'{}_xhtml'.format(elem.name)) - - # This is needed to avoid a successive encapsulation with a new
...
- # each time the item is modified (encapsulation is done in self.data2entry). - data = xml_tools.decapsulateDomishContent(data_elt) - + data = data_elt.toXml() microblog_data[key] = yield self.host.plugins["TEXT-SYNTAXES"].clean_xhtml(data) else: key = check_conflict(elem.name) diff -r bf7e468fe440 -r 1359ad0b37c2 src/tools/xml_tools.py --- a/src/tools/xml_tools.py Wed Jan 13 13:08:31 2016 +0100 +++ b/src/tools/xml_tools.py Wed Jan 13 13:11:20 2016 +0100 @@ -1355,21 +1355,6 @@ return self.result.firstChildElement() -def decapsulateDomishContent(elt): - """Return the inner content of a domish.Element. - - @param elt (domish.Element) - @return unicode - """ - result = '' - for child in elt.children: - try: - result += child.toXml() # child id a domish.Element - except AttributeError: - result += child # child is unicode - return result - - # FIXME: this method is duplicated from frontends.tools.xmlui.getText def getText(node): """Get child text nodes of a domish.Element.