Allow wikilinks in "show/hide <type of change>" labels on Watchlist and RecentChanges
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index ff62e9e..9493663 100644 (file)
@@ -855,11 +855,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()
                        )
                );
        }