From 0c9eac37efd92f74b5be4da4b18387f921716db4 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Sun, 3 Mar 2019 15:11:47 +0000 Subject: [PATCH] Enable extraction of filenames with question marks #479 (#480) Closes #479. --- www/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/app.js b/www/js/app.js index 140a8d8d..b8417fa1 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -971,7 +971,8 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles this.target = "_blank"; } else { // It's a link to an article or file in the ZIM - var decodedURL = decodeURIComponent(zimUrl); + var uriComponent = uiUtil.removeUrlParameters(zimUrl); + var decodedURL = decodeURIComponent(uriComponent); var contentType; var downloadAttrValue; // Some file types need to be downloaded rather than displayed (e.g. *.epub) @@ -1191,7 +1192,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles */ function goToArticle(title, download, contentType) { $("#searchingArticles").show(); - title = uiUtil.removeUrlParameters(title); selectedArchive.getDirEntryByTitle(title).then(function(dirEntry) { if (dirEntry === null || dirEntry === undefined) { $("#searchingArticles").hide();