From b1935023d457960689ae91935f4c83c70b71e4f1 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 30 Nov 2007 18:47:35 +0000 Subject: [PATCH] Make sure to normalize invalid character references. --- includes/GlobalFunctions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) ) { -- 2.20.1