X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=67ce1f3c11f602167ba2560f50ced2acbc7711d1;hb=dc77b2645242158f5b092aa63966cdb4b91d955f;hp=4f6b7b4bbbaa1448bd418cb40214fe85f8e9670e;hpb=486895a5b3e9f759ca7c30ee9cddd17819e8775f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 4f6b7b4bbb..67ce1f3c11 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -938,7 +938,7 @@ class EditPage { if ( $this->incompleteForm ) { # If the form is incomplete, force to preview. wfDebug( __METHOD__ . ": Form data appears to be incomplete\n" ); - wfDebug( "POST DATA: " . var_export( $_POST, true ) . "\n" ); + wfDebug( "POST DATA: " . var_export( $request->getPostValues(), true ) . "\n" ); $this->preview = true; } else { $this->preview = $request->getCheck( 'wpPreview' ); @@ -4111,12 +4111,15 @@ ERROR; $script .= '});'; + $nonce = $wgOut->getCSPNonce(); + $wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) ); + $toolbar = '
'; if ( Hooks::run( 'EditPageBeforeEditToolbar', [ &$toolbar ] ) ) { // Only add the old toolbar cruft to the page payload if the toolbar has not // been over-written by a hook caller - $wgOut->addScript( ResourceLoader::makeInlineScript( $script ) ); + $wgOut->addScript( ResourceLoader::makeInlineScript( $script, $nonce ) ); }; return $toolbar;