From 889e988ccec3428a10c8313866d1b925a9ff794b Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 25 Aug 2013 18:50:38 +0200 Subject: [PATCH] Parse limitation warnings as 'text' and in user language 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 1ab29eb159..170148cd8f 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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" ); } -- 2.20.1