From 8b18be9ce8f79c39d1d7c5b47df275a9f003dac4 Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Fri, 5 Jan 2018 18:02:35 +0000 Subject: [PATCH] Fixed a regression in the random page function that was affecting #37 Former-commit-id: 42296ff5660f1641fe192acc228a20d73e9e569c [formerly e549900ce3a9f523facbb3d69f8116136de06552] Former-commit-id: e0c4280e754da652543ba645dd7783e64906a089 --- 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 5e7c09cf..9b9c05f5 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1756,7 +1756,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile }); //Clean up remaining geo: links - htmlArticle = htmlArticle.replace(/href\s*=\s*"\s*geo:([\d.]+),([\d.]+)/ig, 'href="bingmaps:?collection=point.$1_$2'); + htmlArticle = htmlArticle.replace(/href\s*=\s*"\s*geo:([\d.-]+),([\d.-]+)/ig, 'href="bingmaps:?collection=point.$1_$2'); //Setup footnote backlinks if the ZIM doesn't have any htmlArticle = htmlArticle.replace(/(?![^/]+↑)/ig, function (match, p1) { @@ -2343,7 +2343,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile else { if (dirEntry.namespace === 'A') { $("#articleName").html(dirEntry.title); - pushBrowserHistoryState(dirEntry.url); + pushBrowserHistoryState(dirEntry.namespace + "/" + dirEntry.url); $("#readingArticle").show(); $('#articleContent').contents().find('body').html(""); readArticle(dirEntry);