http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56472
Revision: 56472 Author: brion Date: 2009-09-17 00:57:10 +0000 (Thu, 17 Sep 2009) Log Message: ----------- Revert r53832, r53897, r54145 "(bug 17988) Spaces before [[Category:]] links are no longer ignored" and followup Causes entire page to go blank under some circumstances. Modified Paths: -------------- trunk/phase3/includes/parser/Parser.php Modified: trunk/phase3/includes/parser/Parser.php =================================================================== --- trunk/phase3/includes/parser/Parser.php 2009-09-17 00:56:27 UTC (rev 56471) +++ trunk/phase3/includes/parser/Parser.php 2009-09-17 00:57:10 UTC (rev 56472) @@ -1726,7 +1726,7 @@ if ( $ns == NS_CATEGORY ) { wfProfileIn( __METHOD__."-category" ); - $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87 + $s = rtrim($s . "\n"); # bug 87 if ( $wasblank ) { $sortkey = $this->getDefaultSort(); @@ -1742,7 +1742,7 @@ * Strip the whitespace Category links produce, see bug 87 * @todo We might want to use trim($tmp, "\n") here. */ - $s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail; + $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail; wfProfileOut( __METHOD__."-category" ); continue; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs