r92048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92047‎ | r92048 | r92049 >
Date:05:30, 13 July 2011
Author:nad
Status:deferred
Tags:
Comment:
no htmlentities in populateForm, only the preg_quote is required
Modified paths:
  • /trunk/extensions/RecordAdmin/RecordAdmin_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php
@@ -614,7 +614,7 @@
615615 $html = preg_replace( "|(<option[^<>]*) selected|i", "$1", $html ); # remove the currently selected option
616616 if( $v ) {
617617 foreach( self::split( $v ) as $v ) {
618 - $v = preg_quote( htmlentities( $v ), '|' );
 618+ $v = preg_quote( $v, '|' );
619619 $html = preg_match( "|<option[^>]+value\s*=|is", $html )
620620 ? preg_replace( "|(<option)([^>]+value\s*=\s*[\"']{$v}['\"])|is", "$1 selected$2", $html )
621621 : preg_replace( "|(<option[^>]*)(?=>$v</option>)|is", "$1 selected", $html );

Status & tagging log