* Reverting changes made in revision 1.33 by gwicke which was supposed to fix
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 26 Mar 2006 03:22:10 +0000 (03:22 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sun, 26 Mar 2006 03:22:10 +0000 (03:22 +0000)
  the "Validating the contents of the id attribute" test case:
  - Doesn't validate HTML id attributes according to the spec
  - Creates a namespace clash where a user could specify two id's which would
    be merged into one by the software
  - Probably not worth the effort to "fix" this at all

includes/Sanitizer.php

index aa478eb..45f7a49 100644 (file)
@@ -622,9 +622,6 @@ class Sanitizer {
                );
 
                $id = urlencode( Sanitizer::decodeCharReferences( strtr( $id, ' ', '_' ) ) );
-               # *must* start with letters (a-zA-Z), so prefix with something
-               # informative
-               $id = preg_replace('/^([0-9])/','iHaveToStartWithALetter-\\1', $id); 
 
                return str_replace( array_keys( $replace ), array_values( $replace ), $id );
        }