diff --git a/addons/base/static/lib/qweb/qweb2.js b/addons/base/static/lib/qweb/qweb2.js index 5067d30d70e..5041142924d 100644 --- a/addons/base/static/lib/qweb/qweb2.js +++ b/addons/base/static/lib/qweb/qweb2.js @@ -35,10 +35,10 @@ var QWeb2 = { return (noquotes ? '' : "'") + s.replace(/\r?\n/g, "\\n").replace(/'/g, "\\'") + (noquotes ? '' : "'"); }, html_escape: function(s, attribute) { - if (s === null || s === undefined) { + if (s == null) { return ''; } - s = (new String(s)).replace(/&/g, '&').replace(//g, '>'); + s = String(s).replace(/&/g, '&').replace(//g, '>'); if (attribute) { s = s.replace(/"/g, '"'); }