From 0a2db9c1e9fdb0b5e889428a214797d447b6b9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Mon, 24 Oct 2022 18:44:04 +0200 Subject: [PATCH] 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 --- modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js index e881e2f1bf..e60a795a69 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWMagicLinkNode.js @@ -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, '' ); }; /**