From dc82b1955148217f57d9f573408fc8b271dafe1a Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 15 Sep 2020 16:07:07 +0200 Subject: [PATCH] fix(description): simple text may render HTML tags Signed-off-by: Thierry Bugier --- inc/fields/descriptionfield.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/fields/descriptionfield.class.php b/inc/fields/descriptionfield.class.php index 7c75e5a2a..855386984 100644 --- a/inc/fields/descriptionfield.class.php +++ b/inc/fields/descriptionfield.class.php @@ -69,7 +69,7 @@ public function getValueForDesign() { public function getValueForTargetText($richText) { $text = $this->question->fields['description']; if (!$richText) { - $text = nl2br(html_entity_decode($text)); + $text = nl2br(strip_tags(html_entity_decode($text))); } return $text;