summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/widgets/widgets.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2018-02-07 14:13:00 +0100
committerChristophe Matthieu <chm@odoo.com>2018-02-08 11:25:51 +0100
commit152e3f8686ec4f48ba22e5c13f92f72c2640a3b8 (patch)
tree972bdda994617307aa26d3f6bcc4106033ede96c /addons/web_editor/static/src/js/widgets/widgets.js
parentd2f9994e92bbf3871dd3358677230064031bd555 (diff)
[FIX] web_editor: encoding of the attachment name is missing in image src
Diffstat (limited to 'addons/web_editor/static/src/js/widgets/widgets.js')
-rw-r--r--addons/web_editor/static/src/js/widgets/widgets.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js
index e499e83843d..1f150b16862 100644
--- a/addons/web_editor/static/src/js/widgets/widgets.js
+++ b/addons/web_editor/static/src/js/widgets/widgets.js
@@ -305,7 +305,7 @@ var ImageDialog = Widget.extend({
return (r.url || r.id);
});
_.each(this.records, function (record) {
- record.src = record.url || _.str.sprintf('/web/image/%s/%s', record.id, record.name); // Name is added for SEO purposes
+ record.src = record.url || _.str.sprintf('/web/image/%s/%s', record.id, encodeURI(record.name)); // Name is added for SEO purposes
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
});
this.display_attachments();