Parse limitation warnings as 'text' and in user language
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 25 Aug 2013 16:50:38 +0000 (18:50 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 25 Aug 2013 16:50:38 +0000 (18:50 +0200)
The default limitation warning messages contains wiki markup to get bold
text, which does not get parsed with 'escaped'

Before using the message class the call was:
wfMsgExt( "$limitationType-warning", array( 'parsemag', 'escape' ),
$current, $max );
This piece of message does not go into the parser cache.

Change-Id: Ibccfacc9a6b9c43491e3b4ca8f5e8f6a6b1efae9

includes/parser/Parser.php

index 1ab29eb..170148c 100644 (file)
@@ -3180,7 +3180,7 @@ class Parser {
        function limitationWarn( $limitationType, $current = '', $max = '' ) {
                # does no harm if $current and $max are present but are unnecessary for the message
                $warning = wfMessage( "$limitationType-warning" )->numParams( $current, $max )
-                       ->inContentLanguage()->escaped();
+                       ->inLanguage( $this->mOptions->getUserLangObj() )->text();
                $this->mOutput->addWarning( $warning );
                $this->addTrackingCategory( "$limitationType-category" );
        }