Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Escape thumbnail preview url for existing images #5

Merged
merged 1 commit into from
Mar 20, 2017

Conversation

drososanastasios
Copy link

No description provided.

@@ -20,7 +20,7 @@ function PunkAveFileUploader(options)
_.each(files, function(file) {
appendEditableImage({
// cmsMediaUrl is a global variable set by the underscoreTemplates partial of MediaItems.html.twig
'thumbnail_url': viewUrl + '/thumbnails/' + file,
'thumbnail_url': viewUrl + '/thumbnails/' + encodeURIComponent(file),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By not encoding the thumbnail url of the existing files, when the url is wrong the preview images are not displayed.

@luksurious luksurious merged commit abe06f0 into master Mar 20, 2017
@luksurious luksurious deleted the bugfix/escape-thumbnail-url branch March 20, 2017 08:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants