diff options
| author | Xavier Morel <xmo@openerp.com> | 2013-05-16 12:59:08 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2013-05-16 12:59:08 +0200 |
| commit | 5cf564e4e63e374498a173126e307741a9b0ee32 (patch) | |
| tree | ed989e042c5bab97d1752499effc93b4d657778d /addons/web/static/src/js/coresetup.js | |
| parent | 5ceb9a84daf9af1bee2982ba78a02b051ab24b21 (diff) | |
| parent | 543c6012da4022087cb0d2ed5a24571371500f9b (diff) | |
[FIX] handling of multiline strings during qweb translation
Javascript regexps don't provide a DOTALL flag (to make `.` match
newlines) so have to replace `.` by `[\s\S]` hack, as *that* will
match newlines as well as all other characters.
Note: the `m` flag has a different meaning, it makes `^` and `$` match
the start and end of lines rather than the start and end of the
string itself.
bzr revid: xmo@openerp.com-20130516105908-exgtwwf785hrmedo
Diffstat (limited to 'addons/web/static/src/js/coresetup.js')
| -rw-r--r-- | addons/web/static/src/js/coresetup.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index dedb4a49710..fd1ace312a9 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -562,7 +562,7 @@ instance.web.qweb.preprocess_node = function() { 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]; } |
