From 7a281ca6f6a25ae290d9cd1a848a5a014b56a468 Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Wed, 6 Aug 2008 13:54:36 +0000 Subject: [PATCH] Ignore self-links for special pages. They might be there for a good reason, and the current parsing of special-page output means that a link from any subpage of a special page to the special page itself is considered to be a self-link. This is evil, and doesn't take into account parameters added to other parts of the URL (e.g. the unblock form on Special:Ipblocklist) --- includes/parser/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index b30ac8236c..7a2f5f7134 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1745,7 +1745,7 @@ class Parser } # Self-link checking - if( $nt->getFragment() === '' ) { + if( $nt->getFragment() === '' && $nt->getNamespace() != NS_SPECIAL ) { if( in_array( $nt->getPrefixedText(), $selflink, true ) ) { $s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, '', $trail ); continue; -- 2.20.1