Use parseAsBlock() instead of parse() to show the error message in OutputPage::showEr...
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 6 Oct 2012 15:28:09 +0000 (17:28 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sat, 6 Oct 2012 15:28:09 +0000 (17:28 +0200)
When a message name is passed, addWikiMsgArray() is used, so it adds a <p> arround the
result. Do the same when a Message object is passed to that method.

Change-Id: Ie97ad9a921ae3fc6d327531b0ace64b6a08e1fa2

includes/OutputPage.php

index 02f22d9..45704bc 100644 (file)
@@ -2056,7 +2056,7 @@ class OutputPage extends ContextSource {
                $this->prepareErrorPage( $title );
 
                if ( $msg instanceof Message ){
-                       $this->addHTML( $msg->parse() );
+                       $this->addHTML( $msg->parseAsBlock() );
                } else {
                        $this->addWikiMsgArray( $msg, $params );
                }