From f0267ab18248e5b7965123c7ac4bf6ab28d6919e Mon Sep 17 00:00:00 2001 From: Jaifroid Date: Mon, 1 Apr 2019 17:53:00 +0100 Subject: [PATCH] Fix regex to determine location of new tab icon Former-commit-id: b1f74dacd14e24fb8c47a59201d246f591f1cd52 [formerly ba3a8d00272d9e1f81be1bd78597e954d21e4266] Former-commit-id: 4ee7bc7094264da98df8f9cd8f5986086012af43 --- www/js/lib/uiUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/js/lib/uiUtil.js b/www/js/lib/uiUtil.js index 5ad1397e..489ec39b 100644 --- a/www/js/lib/uiUtil.js +++ b/www/js/lib/uiUtil.js @@ -337,7 +337,7 @@ define(['util'], function(util) { var desc = "Open article in new tab or window"; var iframe = document.getElementById('articleContent').contentDocument; // Remove the file and any query string from href - var prefix = window.location.href.replace(/^((?!.*\?).*\/|(?=.*\/).*\/(?=[^\/]+\?)).*$/, '$1'); + var prefix = window.location.href.replace(/^((?!.*\?).*\/|(?=.*\/).*\/(?=[^\/]*\?)).*$/, '$1'); var div = document.createElement('div'); div.style.cssText = 'left: 95%; top: 10px; position: absolute; z-index: 2;'; div.id = "openInTab";