case-insensitive names.
* Adding the fix for lists in RTL wikis to more skins, and fixing the image toc
* (bug 8157) Remove redirects from Special:Unusedtemplates. Patch by WebBoy.
+* (bug 10721) Duplicate section anchors with differing case now disambiguated
+ for Internet Explorer's sake
+
=== API changes in 1.13 ===
# Save headline for section edit hint before it's escaped
$headlineHint = $safeHeadline;
$safeHeadline = Sanitizer::escapeId( $safeHeadline );
+ # lowercase headline, since some browser don't distinguish
+ # "Anchor" from "anchor" (bug #10721)
+ $arrayKey = strtolower( $safeHeadline );
+
+ # XXX : Is $refers[$headlineCount] ever accessed, actually ?
$refers[$headlineCount] = $safeHeadline;
# count how many in assoc. array so we can track dupes in anchors
- isset( $refers[$safeHeadline] ) ? $refers[$safeHeadline]++ : $refers[$safeHeadline] = 1;
- $refcount[$headlineCount] = $refers[$safeHeadline];
+ isset( $refers[$arrayKey] ) ? $refers[$arrayKey]++ : $refers[$arrayKey] = 1;
+ $refcount[$headlineCount] = $refers[$arrayKey];
# Don't number the heading if it is the only one (looks silly)
if( $doNumberHeadings && count( $matches[3] ) > 1) {
!! end
+!! test
+Resolving duplicate section names with differing case (bug 10721)
+!! input
+== Foo bar ==
+== Foo Bar ==
+!! result
+<a name="Foo_bar"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=1" title="Edit section: Foo bar">edit</a>]</span> <span class="mw-headline"> Foo bar </span></h2>
+<a name="Foo_Bar_2"></a><h2><span class="editsection">[<a href="/index.php?title=Parser_test&action=edit&section=2" title="Edit section: Foo Bar">edit</a>]</span> <span class="mw-headline"> Foo Bar </span></h2>
+
+!! end
+
!! article
Template:sections
!! text