From e49d310ea943916089b5381b00df20b1f9a9e52e Mon Sep 17 00:00:00 2001 From: Jermolene Date: Wed, 20 Jul 2016 11:37:44 +0100 Subject: [PATCH] Relax external link matching to ignore illegal characters Fixes #2501, and rolls back some of #2324 --- core/modules/utils/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 6b62eafd1..e322811d9 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -495,7 +495,7 @@ exports.escapeRegExp = function(s) { // Checks whether a link target is external, i.e. not a tiddler title exports.isLinkExternal = function(to) { - var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)$/i; + var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i; return externalRegExp.test(to); };