Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -3485,7 +3485,7 @@ |
3486 | 3486 | * @private |
3487 | 3487 | */ |
3488 | 3488 | function formatHeadings( $text, $origText, $isMain=true ) { |
3489 | | - global $wgMaxTocLevel, $wgContLang, $wgExperimentalHtmlIds; |
| 3489 | + global $wgMaxTocLevel, $wgContLang, $wgHtml5, $wgExperimentalHtmlIds; |
3490 | 3490 | |
3491 | 3491 | $doNumberHeadings = $this->mOptions->getNumberHeadings(); |
3492 | 3492 | $showEditLink = $this->mOptions->getEditSection(); |
— | — | @@ -3661,7 +3661,7 @@ |
3662 | 3662 | # Save headline for section edit hint before it's escaped |
3663 | 3663 | $headlineHint = $safeHeadline; |
3664 | 3664 | |
3665 | | - if ( $wgExperimentalHtmlIds ) { |
| 3665 | + if ( $wgHtml5 && $wgExperimentalHtmlIds ) { |
3666 | 3666 | # For reverse compatibility, provide an id that's |
3667 | 3667 | # HTML4-compatible, like we used to. |
3668 | 3668 | # |
Index: trunk/phase3/includes/Sanitizer.php |
— | — | @@ -877,10 +877,10 @@ |
878 | 878 | * @return String |
879 | 879 | */ |
880 | 880 | static function escapeId( $id, $options = array() ) { |
881 | | - global $wgExperimentalHtmlIds; |
| 881 | + global $wgHtml5, $wgExperimentalHtmlIds; |
882 | 882 | $options = (array)$options; |
883 | 883 | |
884 | | - if ( $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) { |
| 884 | + if ( $wgHtml5 && $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) { |
885 | 885 | $id = preg_replace( '/[ \t\n\r\f_\'"&]+/', '_', $id ); |
886 | 886 | $id = trim( $id, '_' ); |
887 | 887 | if ( $id === '' ) { |