$out->addHTML( $this->editFormTextTop );
if ( $errorMessage !== '' ) {
- $out->addWikiText( $errorMessage );
+ $out->addWikiTextAsInterface( $errorMessage );
$out->addHTML( "<hr />\n" );
}
# Note that wpSectionTitle is not yet a part of the actual edit form, as wpSummary is
# currently doing double duty as both edit summary and section title. Right now this
# is just to allow API edits to work around this limitation, but this should be
- # incorporated into the actual edit form when EditPage is rewritten (Bugs 18654, 26312).
+ # incorporated into the actual edit form when EditPage is rewritten (T20654, T28312).
$this->sectiontitle = $request->getText( 'wpSectionTitle' );
$this->sectiontitle = preg_replace( '/^\s*=+\s*(.*?)\s*=+\s*$/', '$1', $this->sectiontitle );
case self::AS_CANNOT_USE_CUSTOM_MODEL:
case self::AS_PARSE_ERROR:
case self::AS_UNICODE_NOT_SUPPORTED:
- $out->addWikiText( '<div class="error">' . "\n" . $status->getWikiText() . '</div>' );
+ $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
return true;
case self::AS_SUCCESS_NEW_ARTICLE:
$title = Title::newFromText( $this->editintro );
if ( $title instanceof Title && $title->exists() && $title->userCan( 'read' ) ) {
// Added using template syntax, to take <noinclude>'s into account.
- $this->context->getOutput()->addWikiTextTitleTidy(
+ $this->context->getOutput()->addWikiTextAsContent(
'<div class="mw-editintro">{{:' . $title->getFullText() . '}}</div>',
+ /*linestart*/true,
$this->mTitle
);
return true;
$this->contentFormat,
$ex->getMessage()
);
- $out->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
+ $out->wrapWikiTextAsInterface( 'error', $msg->plain() );
}
}
}
if ( $this->hookError !== '' ) {
- $out->addWikiText( $this->hookError );
+ $out->addWikiTextAsInterface( $this->hookError );
}
if ( $this->section != 'new' ) {
$this->contentFormat,
$ex->getMessage()
);
- $out->addWikiText( '<div class="error">' . $msg->text() . '</div>' );
+ $out->wrapWikiTextAsInterface( 'error', $msg->plain() );
}
}
}
$out->addHTML( "<div class='editCheckboxes'>" . $checkboxesHTML . "</div>\n" );
// Show copyright warning.
- $out->addWikiText( $this->getCopywarn() );
+ $out->addWikiTextAsInterface( $this->getCopywarn() );
$out->addHTML( $this->editFormTextAfterWarn );
$out->addHTML( "<div class='editButtons'>\n" );