Use OutputPage::wrapWikiTextAsInterface() to add safe <div> wrappers
[lhc/web/wiklou.git] / includes / specials / SpecialUserrights.php
index 4205188..f63c884 100644 (file)
@@ -160,7 +160,7 @@ class UserrightsPage extends SpecialPage {
 
                        // save settings
                        if ( !$fetchedStatus->isOK() ) {
-                               $this->getOutput()->addWikiText( $fetchedStatus->getWikiText() );
+                               $this->getOutput()->addWikiTextAsInterface( $fetchedStatus->getWikiText() );
 
                                return;
                        }
@@ -189,7 +189,7 @@ class UserrightsPage extends SpecialPage {
                                        return;
                                } else {
                                        // Print an error message and redisplay the form
-                                       $out->addWikiText( '<div class="error">' . $status->getWikiText() . '</div>' );
+                                       $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() );
                                }
                        }
                }
@@ -468,7 +468,7 @@ class UserrightsPage extends SpecialPage {
        function editUserGroupsForm( $username ) {
                $status = $this->fetchUser( $username, true );
                if ( !$status->isOK() ) {
-                       $this->getOutput()->addWikiText( $status->getWikiText() );
+                       $this->getOutput()->addWikiTextAsInterface( $status->getWikiText() );
 
                        return;
                } else {