comparison src/plugins/plugin_xep_0277.py @ 1750:6fd0881fe1fc

tools, plugins XEP-0071, XEP-0277: remove recently added expandNewLinesToXHTML, just leave it to the convertors
author souliane <souliane@mailoo.org>
date Tue, 15 Dec 2015 20:29:19 +0100
parents cc31dd72526d
children 30efe084471c
comparison
equal deleted inserted replaced
1749:d047535e3ed5 1750:6fd0881fe1fc
370 converted = yield synt.convert(data[attr], synt.getCurrentSyntax(profile), "XHTML") 370 converted = yield synt.convert(data[attr], synt.getCurrentSyntax(profile), "XHTML")
371 if '{}_xhtml'.format(elem_name) in data: 371 if '{}_xhtml'.format(elem_name) in data:
372 raise failure.Failure(exceptions.DataError(_("Can't have xhtml and rich content at the same time"))) 372 raise failure.Failure(exceptions.DataError(_("Can't have xhtml and rich content at the same time")))
373 else: # clean the XHTML input 373 else: # clean the XHTML input
374 converted = yield synt.clean_xhtml(data[attr]) 374 converted = yield synt.clean_xhtml(data[attr])
375 converted = xml_tools.expandNewLinesToXHTML(converted)
376 375
377 xml_content = u'<div xmlns="{ns}">{converted}</div>'.format( 376 xml_content = u'<div xmlns="{ns}">{converted}</div>'.format(
378 ns=NS_XHTML, 377 ns=NS_XHTML,
379 converted=converted) 378 converted=converted)
380 elem.addChild(xml_tools.ElementParser()(xml_content)) 379 elem.addChild(xml_tools.ElementParser()(xml_content))