1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Remove tilde from characters not allowed in external URLs

This commit is contained in:
Jermolene 2016-07-13 14:06:47 +01:00
parent b24488174c
commit 782553eb62
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ exports.types = {inline: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^~]+(?:\/|\b)/mg;
this.matchRegExp = /~?(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/mg;
};
exports.parse = function() {

View File

@ -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);
};