r56470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56469‎ | r56470 | r56471 >
Date:00:51, 17 September 2009
Author:brion
Status:ok
Tags:
Comment:
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:
  • /branches/wmf-deployment/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/parser/Parser.php
@@ -1726,7 +1726,7 @@
17271727
17281728 if ( $ns == NS_CATEGORY ) {
17291729 wfProfileIn( __METHOD__."-category" );
1730 - $s = preg_replace( "/(\s*\n)+\s*$/D", '', $s ); # bug 87
 1730+ $s = rtrim($s . "\n"); # bug 87
17311731
17321732 if ( $wasblank ) {
17331733 $sortkey = $this->getDefaultSort();
@@ -1742,7 +1742,7 @@
17431743 * Strip the whitespace Category links produce, see bug 87
17441744 * @todo We might want to use trim($tmp, "\n") here.
17451745 */
1746 - $s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail;
 1746+ $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail;
17471747
17481748 wfProfileOut( __METHOD__."-category" );
17491749 continue;

Follow-up revisions

RevisionCommit summaryAuthorDate
r56472Revert r53832, r53897, r54145 "(bug 17988) Spaces before [[Category:]] links ...brion00:57, 17 September 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53832* (bug 17988) Spaces before [[Category:]] links are no longer ignored...ialex19:42, 27 July 2009
r53897Per Simetrical's comment on r53832: only trim if there're newlinesialex20:16, 28 July 2009
r54145Per Nikerabbit's comment on r53897 (i.e. fix for r53832, second attempt): cha...ialex12:41, 1 August 2009

Status & tagging log