jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394832 )

Change subject: Allow wikilinks in "show/hide <type of change>" labels on 
Watchlist and RecentChanges
......................................................................


Allow wikilinks in "show/hide <type of change>" labels on Watchlist and 
RecentChanges

This is done by treating the messages as wikitext rather than plain
text

Bug: T142406
Change-Id: I5342b9491df47bbb549e91ebba9d0a8b273a7d17
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
2 files changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index cfc7a85..bdca301 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -943,7 +943,7 @@
                        $links[] = Html::rawElement(
                                'span',
                                $attribs,
-                               $this->msg( $msg )->rawParams( $link 
)->escaped()
+                               $this->msg( $msg )->rawParams( $link )->parse()
                        );
                }
 
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index ff62e9e..9493663 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -855,11 +855,12 @@
                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()
                        )
                );
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/394832
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5342b9491df47bbb549e91ebba9d0a8b273a7d17
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Pppery <maprea...@olum.org>
Gerrit-Reviewer: Brian Wolff <bawolff...@gmail.com>
Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com>
Gerrit-Reviewer: Pppery <maprea...@olum.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to