From 3ec3f08ca5c7bfae820bbc8085eff0809abd688b Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 11 Jul 2015 21:06:03 -0700 Subject: [PATCH] OOUIHTMLForm: Wrap help text in OOUI\HtmlSnippet HTMLFormField::getHelpText() returns HTML and should not be escaped. Depends upon 1dbef2766f23 in OOUI. Bug: T104422 Change-Id: I33c8ebb448e345db7bf8b8ad540336b5b9d6aea1 --- includes/htmlform/HTMLFormField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLFormField.php b/includes/htmlform/HTMLFormField.php index e19273bba5..3e30d79d59 100644 --- a/includes/htmlform/HTMLFormField.php +++ b/includes/htmlform/HTMLFormField.php @@ -585,7 +585,7 @@ abstract class HTMLFormField { 'classes' => array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass ), 'align' => $this->getLabelAlignOOUI(), 'label' => $this->getLabel(), - 'help' => $this->getHelpText(), + 'help' => new OOUI\HtmlSnippet( $this->getHelpText() ), 'infusable' => $infusable, ) ); @@ -729,7 +729,7 @@ abstract class HTMLFormField { /** * Determine the help text to display * @since 1.20 - * @return string + * @return string HTML */ public function getHelpText() { $helptext = null; -- 2.20.1