[FIX] web_editor: do not escape saved html.

Forward-port of 8c77c711ee.
This change has been forgot during last forward-port
(edeceba7df)
This commit is contained in:
Christophe Simonis
2015-08-28 17:39:23 +02:00
parent 59c5ff08be
commit 2f28daa26c
-9
View File
@@ -5,7 +5,6 @@ from openerp.exceptions import AccessError
from openerp.osv import osv
from lxml import etree, html
from openerp import api
from openerp.tools import html_escape
class view(osv.osv):
@@ -74,14 +73,6 @@ class view(osv.osv):
# ensure there's only one match
[root] = arch.xpath(section_xpath)
# html text need to be escaped for xml storage
def escape_node(node):
node.text = node.text and html_escape(node.text)
node.tail = node.tail and html_escape(node.tail)
escape_node(replacement)
for descendant in replacement.iterdescendants():
escape_node(descendant)
root.text = replacement.text
root.tail = replacement.tail
# replace all children