global $wgParser;
$this->setHeaders();
+ $this->addHelpLink( 'Help:ExpandTemplates' );
$request = $this->getRequest();
$titleStr = $request->getText( 'wpContextTitle' );
}
$config = $this->getConfig();
- if ( $config->get( 'UseTidy' ) && $options->getTidy() ) {
+ if ( MWTidy::isEnabled() && $options->getTidy() ) {
$tmp = MWTidy::tidy( $tmp );
+ } else {
+ wfDeprecated( 'disabling tidy', '1.33' );
}
$out->addHTML( $tmp );
*
* @param string $title Value for context title field
* @param string $input Value for input textbox
- * @return string
*/
private function makeForm( $title, $input ) {
$fields = [
'size' => 60,
'default' => $title,
'autofocus' => true,
- 'cssclass' => 'mw-ui-input-inline',
],
'input' => [
'type' => 'textarea',
'rows' => 10,
'default' => $input,
'id' => 'input',
+ 'useeditfont' => true,
],
'removecomments' => [
'type' => 'check',
$output,
10,
10,
- [ 'id' => 'output', 'readonly' => 'readonly' ]
+ [
+ 'id' => 'output',
+ 'readonly' => 'readonly',
+ 'class' => 'mw-editfont-' . $this->getUser()->getOption( 'editfont' )
+ ]
);
return $out;
$user = $this->getUser();
// To prevent cross-site scripting attacks, don't show the preview if raw HTML is
- // allowed and a valid edit token is not provided (bug 71111). However, MediaWiki
+ // allowed and a valid edit token is not provided (T73111). However, MediaWiki
// does not currently provide logged-out users with CSRF protection; in that case,
// do not show the preview unless anonymous editing is allowed.
if ( $user->isAnon() && !$user->isAllowed( 'edit' ) ) {