Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3618,7 +3618,7 @@ |
3619 | 3619 | # Save headline for section edit hint before it's escaped |
3620 | 3620 | $headlineHint = $safeHeadline; |
3621 | 3621 | $safeHeadline = Sanitizer::escapeId( $safeHeadline, |
3622 | | - $wgEnforceHtmlIds ? array() : 'xml' ); |
| 3622 | + $wgEnforceHtmlIds ? 'noninitial' : 'xml' ); |
3623 | 3623 | # HTML names must be case-insensitively unique (bug 10721) |
3624 | 3624 | $arrayKey = strtolower( $safeHeadline ); |
3625 | 3625 | |
— | — | @@ -4688,7 +4688,7 @@ |
4689 | 4689 | # Strip out wikitext links(they break the anchor) |
4690 | 4690 | $text = $this->stripSectionName( $text ); |
4691 | 4691 | return '#' . Sanitizer::escapeId( $text, |
4692 | | - $wgEnforceHtmlIds ? array() : 'xml' ); |
| 4692 | + $wgEnforceHtmlIds ? 'noninitial' : 'xml' ); |
4693 | 4693 | } |
4694 | 4694 | |
4695 | 4695 | /** |
Index: trunk/phase3/includes/Sanitizer.php |
— | — | @@ -620,7 +620,7 @@ |
621 | 621 | if ( $attribute === 'id' ) { |
622 | 622 | global $wgEnforceHtmlIds; |
623 | 623 | $value = Sanitizer::escapeId( $value, |
624 | | - $wgEnforceHtmlIds ? array() : 'xml' ); |
| 624 | + $wgEnforceHtmlIds ? 'noninitial' : 'xml' ); |
625 | 625 | } |
626 | 626 | |
627 | 627 | // If this attribute was previously set, override it. |
— | — | @@ -806,18 +806,11 @@ |
807 | 807 | $id = urlencode( Sanitizer::decodeCharReferences( strtr( $id, ' ', '_' ) ) ); |
808 | 808 | $id = str_replace( array_keys( $replace ), array_values( $replace ), $id ); |
809 | 809 | |
810 | | - /* |
811 | | - // Let's not go changing our links just yet, since we plan to |
812 | | - // rip this out anyway and switch to the prettier Unicode-friendly |
813 | | - // links as XHTML and HTML 5 allow and browsers seem to think is |
814 | | - // just a-ok to do. |
815 | | - // |
816 | 810 | if ( !preg_match( '/^[a-zA-Z]/', $id ) |
817 | 811 | && !in_array( 'noninitial', $options ) ) { |
818 | 812 | // Initial character must be a letter! |
819 | 813 | $id = "x$id"; |
820 | 814 | } |
821 | | - */ |
822 | 815 | return $id; |
823 | 816 | } |
824 | 817 | |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -457,7 +457,7 @@ |
458 | 458 | # one version of Opera 9.x. The W3C validator, for one, doesn't seem |
459 | 459 | # to care if they aren't encoded. |
460 | 460 | return Sanitizer::escapeId( $fragment, |
461 | | - $wgEnforceHtmlIds ? array() : 'xml' ); |
| 461 | + $wgEnforceHtmlIds ? 'noninitial' : 'xml' ); |
462 | 462 | } |
463 | 463 | |
464 | 464 | #---------------------------------------------------------------------------- |