Caused search terms containing underscores to fail, as they had the underscores silently changed to spaces.
The means it's impossible to search for many programming terms in body text, say function names like 'str_replace'.
This was listed as a fix for bug 13616, but that seems to actually be about bad links in custom 'no article' text.
The links should be corrected instead.
* (bug 13576) maintenance/rebuildrecentchanges.php fails
* (bug 13441) Allow Special:Recentchanges to show bots only
* (bug 13431) Show true message source in Special:Allmessages&ot=php / xml
-* (bug 13616) Replace underscores in search terms by spaces
* (bug 13463) Login successful page doesn't use user's preferred interface language
* (bug 13630) Fixed warnings for pass by reference at call time in
Special:Revisiondelete when generating the log entry.
function wfSpecialSearch( $par = '' ) {
global $wgRequest, $wgUser;
- $search = str_replace( array('_', "\n"), " ",
- $wgRequest->getText( 'search', $par ) );
+ $search = str_replace( "\n", " ", $wgRequest->getText( 'search', $par ) );
$searchPage = new SpecialSearch( $wgRequest, $wgUser );
if( $wgRequest->getVal( 'fulltext' ) ||
!is_null( $wgRequest->getVal( 'offset' ) ) ||