r91932 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91931‎ | r91932 | r91933 >
Date:00:25, 12 July 2011
Author:brion
Status:ok
Tags:
Comment:
Followup r91833 -- use Sanitizer::escapeId's 'noninitial' option when generating sanitized ID for a sidebar entry; the actual id is prefixed with 'n-'; this fix makes the items behave like the folder sections ('p-', already escaped this way)
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1336,7 +1336,7 @@
13371337 $bar[$heading][] = array_merge( array(
13381338 'text' => $text,
13391339 'href' => $href,
1340 - 'id' => 'n-' . Sanitizer::escapeId( strtr( $line[1], ' ', '-' ) ),
 1340+ 'id' => 'n-' . Sanitizer::escapeId( strtr( $line[1], ' ', '-' ), 'noninitial' ),
13411341 'active' => false
13421342 ), $extraAttribs );
13431343 } elseif ( ( substr( $line, 0, 2 ) == '{{' ) && ( substr( $line, -2 ) == '}}' ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91833Escape sidebar ID's. Bug 18688diebuche14:56, 10 July 2011

Status & tagging log