summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/widgets/widgets.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-09-05 18:52:27 +0200
committerChristophe Simonis <chs@odoo.com>2018-09-05 18:52:27 +0200
commitf19e6ce561b80d291cc97bf928c4b84b48ec0f59 (patch)
tree7c5419b940876244f95d055682bbe19429ff4747 /addons/web_editor/static/src/js/widgets/widgets.js
parent7700bd172f790858fb4cb9e64b90c9c77d9e5b0a (diff)
parent213759b03e5466f119f52a557d7feefb9d477267 (diff)
[MERGE] forward port branch 11.0 up to 213759b03e5
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 00e02e6e032..3fe18ab503e 100644
--- a/addons/web_editor/static/src/js/widgets/widgets.js
+++ b/addons/web_editor/static/src/js/widgets/widgets.js
@@ -507,7 +507,7 @@ var ImageWidget = MediaWidget.extend({
self.$('.well > span').remove();
self.$('.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.isDocument = !(/gif|jpe|jpg|png/.test(record.mimetype));
});
if (error || !attachments.length) {