Skip to content

Commit

Permalink
fix(descriptinfield): conversion to target requires escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Aug 2, 2022
1 parent df62b22 commit b79cfa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/field/descriptionfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ public function getValueForDesign(): string {
public function getValueForTargetText($domain, $richText): ?string {
$text = $this->question->fields['description'];
if (!$richText) {
$text = nl2br(strip_tags(html_entity_decode(__($text, $domain))));
$text = Sanitizer::unsanitize(strip_tags(html_entity_decode(__($text, $domain))));
}

return $text;
return Sanitizer::unsanitize(__($text, $domain));
}

public function moveUploads() {
Expand Down

0 comments on commit b79cfa9

Please sign in to comment.