Skip to content

Commit b79cfa9

Browse files
committed
fix(descriptinfield): conversion to target requires escaping
1 parent df62b22 commit b79cfa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

inc/field/descriptionfield.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ public function getValueForDesign(): string {
7878
public function getValueForTargetText($domain, $richText): ?string {
7979
$text = $this->question->fields['description'];
8080
if (!$richText) {
81-
$text = nl2br(strip_tags(html_entity_decode(__($text, $domain))));
81+
$text = Sanitizer::unsanitize(strip_tags(html_entity_decode(__($text, $domain))));
8282
}
8383

84-
return $text;
84+
return Sanitizer::unsanitize(__($text, $domain));
8585
}
8686

8787
public function moveUploads() {

0 commit comments

Comments
 (0)