From: Kunal Mehta Date: Sun, 12 Jul 2015 04:06:03 +0000 (-0700) Subject: OOUIHTMLForm: Wrap help text in OOUI\HtmlSnippet X-Git-Tag: 1.31.0-rc.0~10751^2 X-Git-Url: https://git.cyclocoop.org/admin/?a=commitdiff_plain;h=3ec3f08ca5c7bfae820bbc8085eff0809abd688b;p=lhc%2Fweb%2Fwiklou.git 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 --- 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;