* Mark wfOut() deprecated
* CheckUser, OpenID and TitleKey still use wfOut :(
}
/**
- * Output some plain text in command-line mode or in the installer (updaters.inc).
- * Do not use it in any other context, its behaviour is subject to change.
+ * Used to be used for outputting text in the installer/updater
+ * @deprecated Warnings in 1.19, removal in 1.20
*/
function wfOut( $s ) {
global $wgCommandLineMode;
}
/**
- * Output some text. Right now this is a wrapper for wfOut, but hopefully
- * that function can go away some day :)
+ * Output some text. If we're running from web, escape the text first.
*
* @param $str String: Text to output
*/
if ( $this->maintenance->isQuiet() ) {
return;
}
- wfOut( $str );
+ global $wgCommandLineMode;
+ if( !$wgCommandLineMode ) {
+ $str = htmlspecialchars( $str );
+ }
+ echo $str;
+ flush();
}
/**