From: Aryeh Gregor Date: Fri, 30 Nov 2007 18:47:35 +0000 (+0000) Subject: Make sure to normalize invalid character references. X-Git-Tag: 1.31.0-rc.0~50654 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=b1935023d457960689ae91935f4c83c70b71e4f1;p=lhc%2Fweb%2Fwiklou.git Make sure to normalize invalid character references. --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 26bf20b26f..1aa48346d6 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -593,7 +593,9 @@ function wfMsgExt( $key, $options ) { if ( in_array('escape', $options) ) { $string = htmlspecialchars ( $string ); } elseif ( in_array( 'escapenoentities', $options ) ) { - $string = str_replace( '&', '&', htmlspecialchars( $string ) ); + $string = htmlspecialchars( $string ); + $string = str_replace( '&', '&', $string ); + $string = Sanitizer::normalizeCharReferences( $string ); } if( in_array('replaceafter', $options) ) {