From ac9d5ac85f80f297681ca538c534468d8a676f8e Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Wed, 13 Oct 2004 04:30:19 +0000 Subject: [PATCH] When checking for self links, use Title::getFragment() rather than searching for '#', so that self-links escaped with character entities are handled correctly. Related to bug 337. --- includes/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 1e53ef8451..de68f81740 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1312,7 +1312,7 @@ class Parser $text = $wgContLang->convert($text); if( ( $nt->getPrefixedText() === $this->mTitle->getPrefixedText() ) && - ( strpos( $link, '#' ) === FALSE ) ) { + ( $nt->getFragment() === '' ) ) { # Self-links are handled specially; generally de-link and change to bold. $s .= $prefix . $sk->makeSelfLinkObj( $nt, $text, '', $trail ); continue; -- 2.20.1