From 541fd57e46f773ce8c6d9f4c7762bd4ed7644341 Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Sun, 5 Feb 2017 21:56:39 +0000 Subject: [PATCH] Don't escape text in some messages so that admins can add links to external tools Admins already have the ability to edit site JS, etc., so I don't think we should be concerned about malicious content This patch allows markup in all messages in the edit interface, except the labels for the checkboxes Bug: T157235 Change-Id: I5f1a2cd536a2c7ec5f7a5d7afbf124104bfcd975 --- Views/AbuseFilterViewEdit.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php index ca25b6a45..a8eddecb9 100644 --- a/Views/AbuseFilterViewEdit.php +++ b/Views/AbuseFilterViewEdit.php @@ -315,7 +315,7 @@ class AbuseFilterViewEdit extends AbuseFilterView { $out->addSubtitle( $this->msg( $filter === 'new' ? 'abusefilter-edit-subtitle-new' : 'abusefilter-edit-subtitle', $this->getLanguage()->formatNum( $filter ), $history_id - )->text() ); + )->parse() ); // Hide hidden filters. if ( ( ( isset( $row->af_hidden ) && $row->af_hidden ) || @@ -402,7 +402,7 @@ class AbuseFilterViewEdit extends AbuseFilterView { } else { $fields['abusefilter-edit-status-label'] = $this->msg( 'abusefilter-edit-status' ) ->numParams( $total, $matches_count, $matches_percent ) - ->escaped(); + ->parse(); } } } @@ -478,7 +478,7 @@ class AbuseFilterViewEdit extends AbuseFilterView { 'p', null, $this->linkRenderer->makeLink( $this->getTitle( "revert/$filter" ), - $this->msg( 'abusefilter-edit-revert' )->text() + new HtmlArmor( $this->msg( 'abusefilter-edit-revert' )->parse() ) ) ); }