diff --git a/www/js/app.js b/www/js/app.js index 13e7f293..072a4f5b 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -741,7 +741,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles iframeArticleContent.onload = function () {}; $("#searchingArticles").hide(); }; - iframeArticleContent.src = dirEntry.namespace + "/" + dirEntry.url; + iframeArticleContent.src = dirEntry.namespace + "/" + encodeURIComponent(dirEntry.url); // Display the iframe content $("#articleContent").show(); }; @@ -814,8 +814,6 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies','abstractFiles var regexpPath = /^(.*\/)[^\/]+$/; // Pattern to find a ZIM URL (with its namespace) - see http://www.openzim.org/wiki/ZIM_file_format#Namespaces var regexpZIMUrlWithNamespace = /(?:^|\/)([-ABIJMUVWX]\/.+)/; - // Pattern to match a local anchor in a href - var regexpLocalAnchorHref = /^#/; // Regex below finds images, scripts and stylesheets with ZIM-type metadata and image namespaces [kiwix-js #378] // It first searches for