tools, plugins XEP-0071, XEP-0277: remove recently added expandNewLinesToXHTML, just leave it to the convertors
This commit is contained in:
parent
99785755e1
commit
3cc6e41ad6
3 changed files with 0 additions and 11 deletions
|
|
@ -119,7 +119,6 @@ class XEP_0071(object):
|
|||
raise exceptions.DataError(_("Can't have xhtml and rich content at the same time"))
|
||||
if xhtml:
|
||||
d = self.synt_plg.clean_xhtml(xhtml)
|
||||
d.addCallback(xml_tools.expandNewLinesToXHTML)
|
||||
d.addCallback(syntax_converted)
|
||||
return d
|
||||
|
||||
|
|
|
|||
|
|
@ -372,7 +372,6 @@ class XEP_0277(object):
|
|||
raise failure.Failure(exceptions.DataError(_("Can't have xhtml and rich content at the same time")))
|
||||
else: # clean the XHTML input
|
||||
converted = yield synt.clean_xhtml(data[attr])
|
||||
converted = xml_tools.expandNewLinesToXHTML(converted)
|
||||
|
||||
xml_content = u'<div xmlns="{ns}">{converted}</div>'.format(
|
||||
ns=NS_XHTML,
|
||||
|
|
|
|||
|
|
@ -1355,15 +1355,6 @@ class ElementParser(object):
|
|||
return self.result.firstChildElement()
|
||||
|
||||
|
||||
def expandNewLinesToXHTML(text):
|
||||
"""Replace two or more "\n" with "\n<br />\n".
|
||||
|
||||
@param text(unicode)
|
||||
@return unicode
|
||||
"""
|
||||
return re.sub(r"\n{2,}", "\n<br />\n", text)
|
||||
|
||||
|
||||
def decapsulateDomishContent(elt):
|
||||
"""Return the inner content of a domish.Element.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue