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:
Bartosz Dziewoński 2022-10-24 18:44:04 +02:00
parent fdb7390d27
commit 0a2db9c1e9

View file

@ -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, '' );
};
/**