Fixed URI encode for the preview of images names

This commit is contained in:
Djamil Legato
2020-07-22 09:44:10 -07:00
parent a2a3fe731c
commit d3011181f0
3 changed files with 4 additions and 3 deletions

View File

@@ -4,6 +4,7 @@
1. [](#bugfix)
* Disabled the EXIF library for Dropzone for fixing the orientation as it was getting applied twice [#1923](https://github.com/getgrav/grav-plugin-admin/issues/1923)
* Forked Dropzone fo fix issue with Resize + Exif orientation [#1923](https://github.com/getgrav/grav-plugin-admin/issues/1923)
* Fixed URI encode for the preview of images names
# v1.10.0-rc.14
## 07/09/2020

View File

@@ -139,9 +139,9 @@ export default class PageMedia extends FilesField {
let file = target.parent('.dz-preview').find('.dz-filename');
let filename = encodeURI(file.text());
let URL = target.closest('[data-media-path]').data('media-path');
let original = this.dropzone.files.filter((file) => encodeURIComponent(file.name) === filename).shift();
let original = this.dropzone.files.filter((file) => encodeURI(file.name) === filename).shift();
original = original && ((original.extras && original.extras.original) || encodeURIComponent(original.name));
original = original && ((original.extras && original.extras.original) || encodeURI(original.name));
target.attr('href', `${URL}/${original}`);
});

File diff suppressed because one or more lines are too long