Make sure to normalize invalid character references.
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 30 Nov 2007 18:47:35 +0000 (18:47 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 30 Nov 2007 18:47:35 +0000 (18:47 +0000)
includes/GlobalFunctions.php

index 26bf20b..1aa4834 100644 (file)
@@ -593,7 +593,9 @@ function wfMsgExt( $key, $options ) {
        if ( in_array('escape', $options) ) {
                $string = htmlspecialchars ( $string );
        } elseif ( in_array( 'escapenoentities', $options ) ) {
-               $string = str_replace( '&amp;', '&', htmlspecialchars( $string ) );
+               $string = htmlspecialchars( $string );
+               $string = str_replace( '&amp;', '&', $string );
+               $string = Sanitizer::normalizeCharReferences( $string );
        }
 
        if( in_array('replaceafter', $options) ) {