r52982 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52981‎ | r52982 | r52983 >
Date:14:50, 9 July 2009
Author:thomasv
Status:deferred
Tags:
Comment:
do not trim ordinary whitespaces
Modified paths:
  • /trunk/extensions/ProofreadPage/ProofreadPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/ProofreadPage.php
@@ -797,12 +797,18 @@
798798 $editpage->header = $editpage->safeUnicodeInput( $request, 'wpHeaderTextbox' );
799799 $editpage->footer = $editpage->safeUnicodeInput( $request, 'wpFooterTextbox' );
800800
 801+ //we want to keep ordinary spaces at the end of the main textbox
 802+ $text = rtrim( $request->getText( 'wpTextbox1' ), "\t\n\r\0\x0B");
 803+ $editpage->textbox1 = $request->getBool( 'safemode' )
 804+ ? $editpage->unmakesafe( $text )
 805+ : $text;
 806+
801807 if( $editpage->quality != null ) {
802808 //format the page
803809 $text = "<noinclude><pagequality level=\"".$editpage->quality."\" user=\"".$editpage->username."\" />"
804810 .$editpage->header."\n\n\n</noinclude>"
805811 .$editpage->textbox1
806 - ."<noinclude>\n".$editpage->footer."</noinclude>";
 812+ ."\n<noinclude>\n".$editpage->footer."</noinclude>";
807813 $editpage->textbox1 = $text;
808814 } else {
809815 //replace deprecated template

Status & tagging log