From 3277fe2bb8a174b9765845f9935f9836cdfc0a4e Mon Sep 17 00:00:00 2001 From: Jerry Holmes Date: Tue, 4 Jul 2017 05:00:24 +0000 Subject: [PATCH] Encode URI of image path for card view vs. normalizePath replace --- src/components/EntryListing/EntryListing.js | 3 +++ src/lib/pathHelper.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/EntryListing/EntryListing.js b/src/components/EntryListing/EntryListing.js index 93cb15041472..faf5b2db1eed 100644 --- a/src/components/EntryListing/EntryListing.js +++ b/src/components/EntryListing/EntryListing.js @@ -41,6 +41,9 @@ export default class EntryListing extends React.Component { const title = label || entry.getIn(['data', inferedFields.titleField]); let image = entry.getIn(['data', inferedFields.imageField]); image = resolvePath(image, publicFolder); + if(image) { + image = encodeURI(image); + } return ( path.replace(/[\\\/]+/g, '/').replace(/[\s]+/g, '%20'); +const normalizePath = path => path.replace(/[\\\/]+/g, '/'); export function resolvePath(path, basePath) { // eslint-disable-line // No path provided, skip