mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
Fixed: Titles containing a URL are interpreted as external links (#2324)
This commit is contained in:
parent
423086bd11
commit
b326ba5b2c
@ -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);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user