[FIX] web_editor: encoding of the attachment name is missing in image src
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user