Skip to content

Commit

Permalink
Remove single quote from illegal characters in URLs
Browse files Browse the repository at this point in the history
Fixes #2493
  • Loading branch information
Jermolene committed Jul 12, 2016
1 parent 1299472 commit dca9e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/modules/parsers/wikiparser/rules/extlink.js
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion core/modules/utils/utils.js
Expand Up @@ -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);
};

Expand Down

0 comments on commit dca9e00

Please sign in to comment.