From 778789dfd7f796e59a24669a1425067d242c9e5c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 4 Aug 2008 05:15:04 +0000 Subject: [PATCH] Followup to r38525 (tweaks from r38400) -- don't put fragments on redlinks; they won't be useful on the edit UI, which isn't a page view. (I suppose it's dubious whether we should do the same to nonexitent special pages.... but fragments there wouldn't be too helpful either so no need for extra logic to add it back. :) --- includes/Linker.php | 5 ----- maintenance/parserTests.txt | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/includes/Linker.php b/includes/Linker.php index 4e4b5f504d..b913ebf10c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -522,11 +522,6 @@ class Linker { $q = 'action=edit&redlink=1&'.$query; } $u = $nt->escapeLocalURL( $q ); - if( $nt->getFragmentForURL() !== '' ) { - # Might seem pointless to have a fragment on a redlink, but let's - # be obedient. - $u .= $nt->getFragmentForURL(); - } $titleText = $nt->getPrefixedText(); if ( '' == $text ) { diff --git a/maintenance/parserTests.txt b/maintenance/parserTests.txt index 0c36f575ed..46f12f469b 100644 --- a/maintenance/parserTests.txt +++ b/maintenance/parserTests.txt @@ -1345,7 +1345,7 @@ Nonexistent special page link with fragment !! input [[Special:ThisNameWillHopefullyNeverBeUsed#anchor]] !! result -

Special:ThisNameWillHopefullyNeverBeUsed#anchor +

Special:ThisNameWillHopefullyNeverBeUsed#anchor

!! end -- 2.20.1