From a70cf9007d5f1023d4defd49fef4e132b8926cce Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 9 Mar 2010 19:47:05 +0000 Subject: [PATCH] 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). --- includes/specials/SpecialListgrouprights.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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" -- 2.20.1