Use ParserOutput stateless transforms
[lhc/web/wiklou.git] / includes / EditPage.php
index a07a236..bcaab3a 100644 (file)
@@ -2408,6 +2408,7 @@ class EditPage {
 
                $out->addModules( 'mediawiki.action.edit' );
                $out->addModuleStyles( 'mediawiki.action.edit.styles' );
+               $out->addModuleStyles( 'mediawiki.editfont.styles' );
 
                $user = $this->context->getUser();
                if ( $user->getOption( 'showtoolbar' ) ) {
@@ -3287,7 +3288,7 @@ class EditPage {
 
        protected function showFormBeforeText() {
                $out = $this->context->getOutput();
-               $out->addHTML( Html::hidden( 'wpSection', htmlspecialchars( $this->section ) ) );
+               $out->addHTML( Html::hidden( 'wpSection', $this->section ) );
                $out->addHTML( Html::hidden( 'wpStarttime', $this->starttime ) );
                $out->addHTML( Html::hidden( 'wpEdittime', $this->edittime ) );
                $out->addHTML( Html::hidden( 'editRevId', $this->editRevId ) );
@@ -4011,7 +4012,10 @@ class EditPage {
                $parserOutput->setEditSectionTokens( false ); // no section edit links
                return [
                        'parserOutput' => $parserOutput,
-                       'html' => $parserOutput->getText() ];
+                       'html' => $parserOutput->getText( [
+                               'enableSectionEditLinks' => false
+                       ] )
+               ];
        }
 
        /**