X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=373f6d9bf6fe592d14c4cdaefbc29d0f312e5963;hb=049ae64857c620ffa3f79d70dc13190418b05744;hp=a79b974ed895775da66621fe06923dfbad15ac26;hpb=995afd709df3702cf6c95812299e5dab19e7d5b1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index a79b974ed8..373f6d9bf6 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1302,8 +1302,12 @@ class EditPage { // Messages: undo-success, undo-failure, undo-main-slot-only, undo-norev, // undo-nochange. $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}"; - $this->editFormPageTop .= $out->parse( "
" . - $this->context->msg( 'undo-' . $undoMsg )->plain() . '
', true, /* interface */true ); + $this->editFormPageTop .= Html::rawElement( + 'div', [ 'class' => $class ], + $out->parseAsInterface( + $this->context->msg( 'undo-' . $undoMsg )->plain() + ) + ); } if ( $content === false ) { @@ -3119,7 +3123,10 @@ ERROR; if ( !$revision->isCurrent() ) { $this->mArticle->setOldSubtitle( $revision->getId() ); - $out->addWikiMsg( 'editingold' ); + $out->wrapWikiMsg( + Html::warningBox( "\n$1\n" ), + 'editingold' + ); $this->isOldRev = true; } } elseif ( $this->mTitle->exists() ) { @@ -3868,9 +3875,10 @@ ERROR; // Do not put big scary notice, if previewing the empty // string, which happens when you initially edit // a category page, due to automatic preview-on-open. - $parsedNote = $out->parse( "
" . - $this->context->msg( 'session_fail_preview_html' )->text() . "
", - true, /* interface */true ); + $parsedNote = Html::rawElement( 'div', [ 'class' => 'previewnote' ], + $out->parseAsInterface( + $this->context->msg( 'session_fail_preview_html' )->plain() + ) ); } $this->incrementEditFailureStats( 'session_loss' ); return $parsedNote; @@ -3945,7 +3953,7 @@ ERROR; # sitecsspreview, sitejsonpreview, sitejspreview if ( $level && $format ) { $note = "
" . - $this->context->msg( "{$level}{$format}preview" )->text() . + $this->context->msg( "{$level}{$format}preview" )->plain() . ' ' . $continueEditing . "
"; } } @@ -3979,20 +3987,27 @@ ERROR; $this->contentFormat, $ex->getMessage() ); - $note .= "\n\n" . $m->parse(); + $note .= "\n\n" . $m->plain(); # gets parsed down below $previewHTML = ''; } if ( $this->isConflict ) { - $conflict = '

' - . $this->context->msg( 'previewconflict' )->escaped() . "

\n"; + $conflict = Html::rawElement( + 'h2', [ 'id' => 'mw-previewconflict' ], + $this->context->msg( 'previewconflict' )->escaped() + ); } else { $conflict = '
'; } - $previewhead = "
\n" . - '

' . $this->context->msg( 'preview' )->escaped() . "

" . - $out->parse( $note, true, /* interface */true ) . $conflict . "
\n"; + $previewhead = Html::rawElement( + 'div', [ 'class' => 'previewnote' ], + Html::rawElement( + 'h2', [ 'id' => 'mw-previewheader' ], + $this->context->msg( 'preview' )->escaped() + ) . + $out->parseAsInterface( $note ) . $conflict + ); $pageViewLang = $this->mTitle->getPageViewLanguage(); $attribs = [ 'lang' => $pageViewLang->getHtmlCode(), 'dir' => $pageViewLang->getDir(),