Unescape entities for prettier/more consistent IDs
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 8 Feb 2010 20:05:17 +0000 (20:05 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 8 Feb 2010 20:05:17 +0000 (20:05 +0000)
Only affects $wgExperimentalHtmlIds = true.

includes/Sanitizer.php

index 9dd648c..8102843 100644 (file)
@@ -881,6 +881,7 @@ class Sanitizer {
                $options = (array)$options;
 
                if ( $wgHtml5 && $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) {
+                       $id = Sanitizer::decodeCharReferences( $id );
                        $id = preg_replace( '/[ \t\n\r\f_\'"&]+/', '_', $id );
                        $id = trim( $id, '_' );
                        if ( $id === '' ) {