Merge "EditWatchlistNormalHTMLForm: Fix double-escaping of section legends"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 3 Sep 2018 21:58:31 +0000 (21:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 3 Sep 2018 21:58:31 +0000 (21:58 +0000)
includes/htmlform/HTMLForm.php
includes/specials/forms/EditWatchlistNormalHTMLForm.php

index 9a78fd8..52a18eb 100644 (file)
@@ -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();
index 5f07073..78b0335 100644 (file)
@@ -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(