addInlineScript() won't work since the content of $mScripts is added to $scripts...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 8 Dec 2010 17:53:57 +0000 (17:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 8 Dec 2010 17:53:57 +0000 (17:53 +0000)
includes/OutputPage.php

index 6f62b11..7df472d 100644 (file)
@@ -2443,7 +2443,7 @@ class OutputPage {
                        $action = $wgRequest->getVal( 'action', 'view' );
                        if( $this->mTitle && $this->mTitle->isJsSubpage() && $sk->userCanPreview( $action ) ) {
                                # XXX: additional security check/prompt?
-                               $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) );
+                               $scripts .= Html::inlineScript( "\n" . $wgRequest->getText( 'wpTextbox1' ) . "\n" ) . "\n";
                        } else {
                                $scripts .= $this->makeResourceLoaderLink(
                                        $sk, array( 'user', 'user.options' ), 'scripts'