mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
ve.dm.MWMagicLinkNode: Fix matching RFC magic links
We need to strip the protocol on both sides. This might have been broken by Ic00b38b04ce78178c64c13bab7f1b2e4b6c5b803 in MediaWiki core. Bug: T321437 Change-Id: I11903b767aebfdb189a8d54fbf6fb7f8ce9ffb6a
This commit is contained in:
parent
fdb7390d27
commit
0a2db9c1e9
|
@ -268,7 +268,7 @@ ve.dm.MWMagicLinkType.prototype.getCode = function () {
|
|||
* @return {boolean}
|
||||
*/
|
||||
ve.dm.MWMagicLinkType.prototype.matchHref = function ( href ) {
|
||||
return href.replace( /^https?:/i, '' ) === this.getHref();
|
||||
return href.replace( /^https?:/i, '' ) === this.getHref().replace( /^https?:/i, '' );
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue