http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62134

Revision: 62134
Author:   simetrical
Date:     2010-02-08 20:15:32 +0000 (Mon, 08 Feb 2010)

Log Message:
-----------
Strip # from IDs, IE doesn't seem to like them

Modified Paths:
--------------
    trunk/phase3/includes/Sanitizer.php

Modified: trunk/phase3/includes/Sanitizer.php
===================================================================
--- trunk/phase3/includes/Sanitizer.php 2010-02-08 20:05:17 UTC (rev 62133)
+++ trunk/phase3/includes/Sanitizer.php 2010-02-08 20:15:32 UTC (rev 62134)
@@ -857,6 +857,7 @@
         *
         * To ensure we don't have to bother escaping anything, we also strip 
', ",
         * & even if $wgExperimentalIds is true.  TODO: Is this the best tactic?
+        * We also strip # because it upsets IE6.
         *
         * @see http://www.w3.org/TR/html401/types.html#type-name Valid 
characters
         *                                                          in the id 
and
@@ -882,7 +883,7 @@
 
                if ( $wgHtml5 && $wgExperimentalHtmlIds && !in_array( 'legacy', 
$options ) ) {
                        $id = Sanitizer::decodeCharReferences( $id );
-                       $id = preg_replace( '/[ \t\n\r\f_\'"&]+/', '_', $id );
+                       $id = preg_replace( '/[ \t\n\r\f_\'"&#]+/', '_', $id );
                        $id = trim( $id, '_' );
                        if ( $id === '' ) {
                                # Must have been all whitespace to start with.



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to