Merge "Allow wikilinks in "show/hide <type of change>" labels on Watchlist and Recent...
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 6 Dec 2017 13:23:47 +0000 (13:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 6 Dec 2017 13:23:47 +0000 (13:23 +0000)
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialWatchlist.php

index 50d8571..32204f8 100644 (file)
@@ -945,7 +945,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        $links[] = Html::rawElement(
                                'span',
                                $attribs,
-                               $this->msg( $msg )->rawParams( $link )->escaped()
+                               $this->msg( $msg )->rawParams( $link )->parse()
                        );
                }
 
index 6eec844..e8e828d 100644 (file)
@@ -857,11 +857,12 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                return Html::rawElement(
                        'span',
                        $attribs,
-                       Xml::checkLabel(
-                               $this->msg( $message, '' )->text(),
-                               $name,
-                               $name,
-                               (int)$value
+                       // not using Html::checkLabel because that would escape the contents
+                       Html::check( $name, (int)$value, [ 'id' => $name ] ) . Html::rawElement(
+                               'label',
+                               $attribs + [ 'for' => $name ],
+                               // <nowiki/> at beginning to avoid messages with "$1 ..." being parsed as pre tags
+                               $this->msg( $message, '<nowiki/>' )->parse()
                        )
                );
        }