From 950af3bf70b02b70a9746cdc4033d33ad4007c67 Mon Sep 17 00:00:00 2001 From: Goffi Date: Tue, 19 Jan 2016 12:21:38 +0100 Subject: [PATCH] plugin XEP-0277: removed cleanXHTML on output data: - while it is mandatory to clean input data, output data sent by frontends should and need to be clean - cleaning all output data means that we can't send be sure that all the XHTML we send is not modified - it's a waste of resources as cleaning today reparse the data with lxml - behaviour may change in the future (e.g. having an option to use cleaning on output data) --- src/plugins/plugin_xep_0277.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/plugin_xep_0277.py b/src/plugins/plugin_xep_0277.py index 4b759b20..dc9ca57c 100755 --- a/src/plugins/plugin_xep_0277.py +++ b/src/plugins/plugin_xep_0277.py @@ -364,8 +364,6 @@ class XEP_0277(object): converted = yield synt.convert(data[attr], synt.getCurrentSyntax(profile), "XHTML") if '{}_xhtml'.format(elem_name) in data: raise failure.Failure(exceptions.DataError(_("Can't have xhtml and rich content at the same time"))) - else: # clean the XHTML input - converted = yield synt.cleanXHTML(data[attr]) xml_content = u'
{converted}
'.format( ns=NS_XHTML,