From 462bce95a9e824923f8b44dcf1ab405a6497d088 Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Thu, 7 Dec 2017 01:42:24 +0000 Subject: [PATCH] placeholder-message for html form should be ->text() not ->parse() placeholder is an html attribute, it does not support arbitrary html, so ->text() is most appropriate, not full parse. Follow up d3cd609e Change-Id: Ia2aa5a001e19ee90e99936ef4f0dc879f182999f --- includes/htmlform/fields/HTMLTextAreaField.php | 2 +- includes/htmlform/fields/HTMLTextField.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/fields/HTMLTextAreaField.php b/includes/htmlform/fields/HTMLTextAreaField.php index e6963d5cde..466a2511a3 100644 --- a/includes/htmlform/fields/HTMLTextAreaField.php +++ b/includes/htmlform/fields/HTMLTextAreaField.php @@ -16,7 +16,7 @@ class HTMLTextAreaField extends HTMLFormField { parent::__construct( $params ); if ( isset( $params['placeholder-message'] ) ) { - $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->parse(); + $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->text(); } elseif ( isset( $params['placeholder'] ) ) { $this->mPlaceholder = $params['placeholder']; } diff --git a/includes/htmlform/fields/HTMLTextField.php b/includes/htmlform/fields/HTMLTextField.php index 1c5a43ddad..b2e4f2a559 100644 --- a/includes/htmlform/fields/HTMLTextField.php +++ b/includes/htmlform/fields/HTMLTextField.php @@ -31,7 +31,7 @@ class HTMLTextField extends HTMLFormField { parent::__construct( $params ); if ( isset( $params['placeholder-message'] ) ) { - $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->parse(); + $this->mPlaceholder = $this->getMessage( $params['placeholder-message'] )->text(); } elseif ( isset( $params['placeholder'] ) ) { $this->mPlaceholder = $params['placeholder']; } -- 2.20.1