Fix replace() call by removing single quotes and adding leading slash.
This commit is contained in:
parent
e26f79237c
commit
4e2e3569ad
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ frappe.ui.form.Attachments = Class.extend({
|
|||
}
|
||||
}
|
||||
// hash is not escaped, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI
|
||||
return encodeURI(file_url).replace('#/g', '%23');
|
||||
return encodeURI(file_url).replace(/#/g, '%23');
|
||||
},
|
||||
remove_attachment_by_filename: function(filename, callback) {
|
||||
this.remove_attachment(this.get_attachments()[filename], callback);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue