Skip to content

Commit

Permalink
fix(TargetChange): use RichText instead of plaintext
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored and btry committed Jul 11, 2023
1 parent 03e6281 commit 8845b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,11 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
$data[$changeField] = $this->prepareTemplate(
Sanitizer::unsanitize(__($this->fields[$changeField], $domain)) ?? '',
$formanswer,
$changeField == 'content' // only content supports rich text
true // all *content supports rich text
);
$data[$changeField] = $data[$changeField] ?? '';

$data[$changeField] = $formanswer->parseTags($data[$changeField], $this, $changeField == 'content');
$data[$changeField] = $formanswer->parseTags($data[$changeField], $this, true); // all *content supports rich text
}

$data['_users_id_recipient'] = $formanswer->fields['requester_id'];
Expand Down

0 comments on commit 8845b88

Please sign in to comment.