N°1576 Portal: Security hardening.

SVN:trunk[5983]
This commit is contained in:
Guillaume Lajarige
2018-07-25 14:48:11 +00:00
parent 3589783ee1
commit ab1715edec
5 changed files with 44 additions and 18 deletions

View File

@@ -28,6 +28,8 @@ use AttributeText;
* Description of TextAreaField
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
* @package \Combodo\iTop\Form\Field
* @since 2.3.0
*/
class TextAreaField extends TextField
{
@@ -112,7 +114,7 @@ class TextAreaField extends TextField
{
if ($this->GetFormat() == TextAreaField::ENUM_FORMAT_TEXT)
{
$sValue = $this->GetCurrentValue();
$sValue = \Str::pure2html($this->GetCurrentValue());
$sValue = AttributeText::RenderWikiHtml($sValue);
return "<div>".str_replace("\n", "<br>\n", $sValue).'</div>';
}