From b326ba5b2c9e622f5fe99b00ab368bb484c1d4e5 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 6 Jun 2016 05:03:04 +1000 Subject: [PATCH] Fixed: Titles containing a URL are interpreted as external links (#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 054cfa495..28ada5ace 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); };