From: Aryeh Gregor Date: Tue, 9 Mar 2010 19:47:05 +0000 (+0000) Subject: Fix validity and correctness of r63342 X-Git-Tag: 1.31.0-rc.0~37499 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=a70cf9007d5f1023d4defd49fef4e132b8926cce;p=lhc%2Fweb%2Fwiklou.git Fix validity and correctness of r63342 The name attribute may only be used on if an id attribute with identical value is given on the same element. I moved the id to the tr so it leaves a bit of space at the top, rather than using a name attribute at all. Also, we need to call Sanitizer::escapeId() on the group key, lest people use spaces or something in the group key (not advisable, but possible). --- diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 9aff7fd57a..e66a195143 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -63,8 +63,7 @@ class SpecialListGroupRights extends SpecialPage { } else { $grouppage = $this->skin->link( Title::newFromText( $grouppageLocalized ), - htmlspecialchars($groupnameLocalized), - array( 'name' => $group ) + htmlspecialchars($groupnameLocalized) ); } @@ -96,16 +95,17 @@ class SpecialListGroupRights extends SpecialPage { $addgroupsSelf = isset( $wgGroupsAddToSelf[$group] ) ? $wgGroupsAddToSelf[$group] : array(); $removegroupsSelf = isset( $wgGroupsRemoveFromSelf[$group] ) ? $wgGroupsRemoveFromSelf[$group] : array(); - $wgOut->addHTML( - ' - ' . + $id = $group == '*' ? false : Sanitizer::escapeId( $group ); + $wgOut->addHTML( Html::rawElement( 'tr', array( 'id' => $id ), + ' + ' . $grouppage . $grouplink . ' ' . self::formatPermissions( $permissions, $revoke, $addgroups, $removegroups, $addgroupsSelf, $removegroupsSelf ) . ' - ' - ); + ' + ) ); } $wgOut->addHTML( Xml::closeElement( 'table' ) . "\n

\n"