From 16b731dc575290c52ec4962f320f677866d59f55 Mon Sep 17 00:00:00 2001 From: Pcoombe Date: Tue, 15 Apr 2014 15:58:51 +0100 Subject: [PATCH] HTMLForm: fix double escaping of checkbox labels in vform mLabel has already been escaped if required. It isn't run through htmlspecialchars() in other display formats, so doesn't need to be done in vform. Change-Id: I0b0feec408687cdadf01da5f2078980015538bb7 --- includes/htmlform/HTMLCheckField.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) mode change 100644 => 100755 includes/htmlform/HTMLCheckField.php diff --git a/includes/htmlform/HTMLCheckField.php b/includes/htmlform/HTMLCheckField.php old mode 100644 new mode 100755 index c7ec014772..a0dd37054d --- a/includes/htmlform/HTMLCheckField.php +++ b/includes/htmlform/HTMLCheckField.php @@ -24,8 +24,7 @@ class HTMLCheckField extends HTMLFormField { array( 'class' => 'mw-ui-checkbox-label' ), - Xml::check( $this->mName, $value, $attr ) . // Html:rawElement doesn't escape contents. - htmlspecialchars( $this->mLabel ) ); + Xml::check( $this->mName, $value, $attr ) . $this->mLabel ); } else { return Xml::check( $this->mName, $value, $attr ) . ' ' -- 2.20.1