summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/coresetup.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2013-06-13 19:39:00 +0200
committerChristophe Simonis <chs@openerp.com>2013-06-13 19:39:00 +0200
commita61e7cb0c80ae773cab9753bd8a4e7e888bbf415 (patch)
tree019a235869a5e087055700895d4584c80e2f9afb /addons/web/static/src/js/coresetup.js
parent5ed0ac2614b9430e61dae472d657a21c037d6ee9 (diff)
parent180e6e41d81e28df43b41e3cb6131225d4169a28 (diff)
[MERGE] forward port of branch saas-1 up to revid 4887 chs@openerp.com-20130612153934-qyp6pb3bc4za4taf
bzr revid: chs@openerp.com-20130613172414-dln3g4j0ykcwaa02 bzr revid: chs@openerp.com-20130613173900-xl7rh321nnw2b04b
Diffstat (limited to 'addons/web/static/src/js/coresetup.js')
-rw-r--r--addons/web/static/src/js/coresetup.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index dedb4a49710..6fc837333b6 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -555,19 +555,19 @@ instance.web.qweb.default_dict = {
instance.web.qweb.preprocess_node = function() {
// Note that 'this' is the Qweb Node
switch (this.node.nodeType) {
- case 3:
- case 4:
+ case Node.TEXT_NODE:
+ case Node.CDATA_SECTION_NODE:
// Text and CDATAs
var translation = this.node.parentNode.attributes['t-translation'];
if (translation && translation.value === 'off') {
return;
}
- var match = /^(\s*)(.+?)(\s*)$/.exec(this.node.data);
+ var match = /^(\s*)([\s\S]+?)(\s*)$/.exec(this.node.data);
if (match) {
this.node.data = match[1] + instance.web._t(match[2]) + match[3];
}
break;
- case 1:
+ case Node.ELEMENT_NODE:
// Element
var attr, attrs = ['label', 'title', 'alt', 'placeholder'];
while (attr = attrs.pop()) {