From 0a948f85611eb6817ac8d8411c7cc6b59df9d9df Mon Sep 17 00:00:00 2001 From: Sander Vocke Date: Sat, 1 Feb 2020 12:02:16 +0059 Subject: [PATCH] Fixed URI encoding. --- src/queries.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/queries.js b/src/queries.js index d0a8bd3..338c3a4 100644 --- a/src/queries.js +++ b/src/queries.js @@ -19,8 +19,8 @@ export function do_image_query(query, database, collection_path, collection_thum var cols = res[0].columns; var data = res[0].values; data.forEach(row => { - var imagepath = process.env.PUBLIC_URL + collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")]; - var thumbpath = process.env.PUBLIC_URL + collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg"; + var imagepath = encodeURI(collection_path + "/" + row[cols.indexOf("relativePath")] + "/" + row[cols.indexOf("name")]); + var thumbpath = encodeURI(collection_thumbs_path + "/" + row[cols.indexOf("uniqueHash")] + ".jpg"); photos.push( create_photo( row[cols.indexOf("id")],