Index: trunk/phase3/includes/Sanitizer.php |
— | — | @@ -857,6 +857,7 @@ |
858 | 858 | * |
859 | 859 | * To ensure we don't have to bother escaping anything, we also strip ', ", |
860 | 860 | * & even if $wgExperimentalIds is true. TODO: Is this the best tactic? |
| 861 | + * We also strip # because it upsets IE6. |
861 | 862 | * |
862 | 863 | * @see http://www.w3.org/TR/html401/types.html#type-name Valid characters |
863 | 864 | * in the id and |
— | — | @@ -882,7 +883,7 @@ |
883 | 884 | |
884 | 885 | if ( $wgHtml5 && $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) { |
885 | 886 | $id = Sanitizer::decodeCharReferences( $id ); |
886 | | - $id = preg_replace( '/[ \t\n\r\f_\'"&]+/', '_', $id ); |
| 887 | + $id = preg_replace( '/[ \t\n\r\f_\'"&#]+/', '_', $id ); |
887 | 888 | $id = trim( $id, '_' ); |
888 | 889 | if ( $id === '' ) { |
889 | 890 | # Must have been all whitespace to start with. |