Clarify info action's "search engine status"
[lhc/web/wiklou.git] / includes / parser / CoreParserFunctions.php
index 2cdfc6e..8246f71 100644 (file)
@@ -377,7 +377,7 @@ class CoreParserFunctions {
 
                // disallow some styles that could be used to bypass $wgRestrictDisplayTitle
                if ( $wgRestrictDisplayTitle ) {
-                       $htmlTagsCallback = function ( $params ) {
+                       $htmlTagsCallback = function ( &$params ) {
                                $decoded = Sanitizer::decodeTagAttributes( $params );
 
                                if ( isset( $decoded['style'] ) ) {
@@ -862,8 +862,13 @@ class CoreParserFunctions {
                if ( $old === false || $old == $text || $arg ) {
                        return '';
                } else {
+                       $converter = $parser->getConverterLanguage()->getConverter();
                        return '<span class="error">' .
-                               wfMessage( 'duplicate-defaultsort', $old, $text )->inContentLanguage()->escaped() .
+                               wfMessage( 'duplicate-defaultsort',
+                                       // Message should be parsed, but these params should only be escaped.
+                                       $converter->markNoConversion( wfEscapeWikiText( $old ) ),
+                                       $converter->markNoConversion( wfEscapeWikiText( $text ) )
+                               )->inContentLanguage()->text() .
                                '</span>';
                }
        }