Enable extraction of filenames with question marks #479 (#480)

Closes #479.
This commit is contained in:
Jaifroid 2019-03-03 15:11:47 +00:00 committed by GitHub
parent dd0d55b6fd
commit 0c9eac37ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -971,7 +971,8 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles
this.target = "_blank"; this.target = "_blank";
} else { } else {
// It's a link to an article or file in the ZIM // 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 contentType;
var downloadAttrValue; var downloadAttrValue;
// Some file types need to be downloaded rather than displayed (e.g. *.epub) // 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) { function goToArticle(title, download, contentType) {
$("#searchingArticles").show(); $("#searchingArticles").show();
title = uiUtil.removeUrlParameters(title);
selectedArchive.getDirEntryByTitle(title).then(function(dirEntry) { selectedArchive.getDirEntryByTitle(title).then(function(dirEntry) {
if (dirEntry === null || dirEntry === undefined) { if (dirEntry === null || dirEntry === undefined) {
$("#searchingArticles").hide(); $("#searchingArticles").hide();