summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-05 17:27:46 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-05 17:27:46 +0200
commite1e27aa009f1236084b20893bad45b49a4bfade2 (patch)
treed8640ae634190447f8d3be1f05a1065632b78bda /addons/web_editor/static/src
parent568445a327030d080da4c08c4156a8117628bdd9 (diff)
parent6773d3644e575551b06c748eb498a5bd44a10430 (diff)
[MERGE] forward port branch saas-14 up to 6773d3644e5
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/widgets.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js
index 2ed5965636a..25b2385222f 100644
--- a/addons/web_editor/static/src/js/widgets.js
+++ b/addons/web_editor/static/src/js/widgets.js
@@ -389,7 +389,7 @@ var ImageDialog = Widget.extend({
$form.find('.well > span').remove();
$form.find('.well > div').show();
_.each(attachments, function (record) {
- record.src = record.url || '/web/image/' + record.id;
+ 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));
});
if (error || !attachments.length) {
@@ -446,7 +446,7 @@ var ImageDialog = Widget.extend({
return (r.url || r.id);
});
_.each(this.records, function (record) {
- record.src = record.url || '/web/image/' + record.id;
+ 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();