summaryrefslogtreecommitdiff
path: root/addons/base/static/lib
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base/static/lib')
-rw-r--r--addons/base/static/lib/qweb/qweb2.js4
1 files changed, 2 insertions, 2 deletions
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, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
+ s = String(s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
if (attribute) {
s = s.replace(/"/g, '&quot;');
}