Add "id" attribute to section anchors, per discussion on wikitech-l.
authorIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 22 Dec 2008 11:45:54 +0000 (11:45 +0000)
committerIlmari Karonen <vyznev@users.mediawiki.org>
Mon, 22 Dec 2008 11:45:54 +0000 (11:45 +0000)
RELEASE-NOTES
includes/Linker.php

index 1732d3d..4422e99 100644 (file)
@@ -436,6 +436,8 @@ The following extensions are migrated into MediaWiki 1.14:
 * (bug 16712) Special:NewFiles updated to use "newer"/"older" paging messages
   for clarity over "previous/next"
 * (bug 16612) Fixed "noprint" class for Modern skin print style
+* Section anchors now have an "id" attribute as well as a "name" attribute,
+  even when Tidy is not used
 
 === API changes in 1.14 ===
 
index 7c52476..870112e 100644 (file)
@@ -1519,7 +1519,7 @@ class Linker {
         * @return string HTML headline
         */
        public function makeHeadline( $level, $attribs, $anchor, $text, $link ) {
-               return "<a name=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
+               return "<a name=\"$anchor\" id=\"$anchor\"></a><h$level$attribs$link <span class=\"mw-headline\">$text</span></h$level>";
        }
 
        /**