r62133 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62132‎ | r62133 | r62134 >
Date:20:05, 8 February 2010
Author:simetrical
Status:ok
Tags:
Comment:
Unescape entities for prettier/more consistent IDs

Only affects $wgExperimentalHtmlIds = true.
Modified paths:
  • /trunk/phase3/includes/Sanitizer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Sanitizer.php
@@ -881,6 +881,7 @@
882882 $options = (array)$options;
883883
884884 if ( $wgHtml5 && $wgExperimentalHtmlIds && !in_array( 'legacy', $options ) ) {
 885+ $id = Sanitizer::decodeCharReferences( $id );
885886 $id = preg_replace( '/[ \t\n\r\f_\'"&]+/', '_', $id );
886887 $id = trim( $id, '_' );
887888 if ( $id === '' ) {

Status & tagging log