From a4c1e10ae6705216a06275cf0f7defed1e06bbe3 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Mon, 30 May 2016 11:50:20 +0200 Subject: [PATCH] [FIX] translate: do not translate Avoid the DOCTYPE tranlation. If this tag is changed, the html rendering is altered. The other effet is that the web_editor wrap the content with to translate, but some explorer eject tags (doctype, head content, script, style, meta) et insert this tags in the body. NB: DOCTYPE is not a node but a text. --- openerp/tools/translate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openerp/tools/translate.py b/openerp/tools/translate.py index 756edfb61ce..3a8f9e6d63d 100644 --- a/openerp/tools/translate.py +++ b/openerp/tools/translate.py @@ -151,6 +151,8 @@ TRANSLATED_ATTRS = { 'string', 'help', 'sum', 'avg', 'confirm', 'placeholder', 'alt', 'title', } +avoid_pattern = re.compile(r"[\s\n]*