memory (params): parameter jids_list values are specified with <jid>...</jid>
This commit is contained in:
parent
a29630c3b6
commit
9e0b24a4a5
1 changed files with 30 additions and 10 deletions
|
|
@ -1367,6 +1367,7 @@ def expandNewLinesToXHTML(text):
|
|||
def decapsulateDomishContent(elt):
|
||||
"""Return the inner content of a domish.Element.
|
||||
|
||||
@param elt (domish.Element)
|
||||
@return unicode
|
||||
"""
|
||||
result = ''
|
||||
|
|
@ -1376,3 +1377,17 @@ def decapsulateDomishContent(elt):
|
|||
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.
|
||||
|
||||
@param node (domish.Element)
|
||||
@return: joined unicode text of all nodes
|
||||
"""
|
||||
data = []
|
||||
for child in node.childNodes:
|
||||
if child.nodeType == child.TEXT_NODE:
|
||||
data.append(child.wholeText)
|
||||
return u"".join(data)
|
||||
|
|
|
|||
Loading…
Reference in a new issue