From: Bartosz DziewoƄski Date: Mon, 3 Sep 2018 20:08:11 +0000 (+0200) Subject: EditWatchlistNormalHTMLForm: Fix double-escaping of section legends X-Git-Tag: 1.34.0-rc.0~4214^2 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=45ced4dfef5a1997aa4d0135e25fb93679465ad2;p=lhc%2Fweb%2Fwiklou.git EditWatchlistNormalHTMLForm: Fix double-escaping of section legends Parent getLegend() returns a plain string, and this method should do the same. Form section legends are escaped by the wrapFieldSetSection() method. Change-Id: I2059b9182fba7362f3d6226252bdc3e032a06c57 --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 9a78fd843b..52a18eb7b8 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1833,7 +1833,7 @@ class HTMLForm extends ContextSource { * * @param string $key * - * @return string + * @return string Plain text (not HTML-escaped) */ public function getLegend( $key ) { return $this->msg( "{$this->mMessagePrefix}-$key" )->text(); diff --git a/includes/specials/forms/EditWatchlistNormalHTMLForm.php b/includes/specials/forms/EditWatchlistNormalHTMLForm.php index 5f07073593..78b0335534 100644 --- a/includes/specials/forms/EditWatchlistNormalHTMLForm.php +++ b/includes/specials/forms/EditWatchlistNormalHTMLForm.php @@ -26,8 +26,8 @@ class EditWatchlistNormalHTMLForm extends OOUIHTMLForm { $namespace = substr( $namespace, 2 ); return $namespace == NS_MAIN - ? $this->msg( 'blanknamespace' )->escaped() - : htmlspecialchars( $this->getContext()->getLanguage()->getFormattedNsText( $namespace ) ); + ? $this->msg( 'blanknamespace' )->text() + : $this->getContext()->getLanguage()->getFormattedNsText( $namespace ); } public function displaySection(