Skip to content

Commit

Permalink
fix(targetchange): changes does not supports rich text
Browse files Browse the repository at this point in the history
fix #1139

Signed-off-by: btry <tbugier@teclib.com>
  • Loading branch information
btry committed Oct 15, 2018
1 parent 069a59a commit 8d7bad0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/targetchange.class.php
Expand Up @@ -1002,6 +1002,11 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
}

$data[$changeField] = $this->parseTags($data[$changeField], $formanswer);

// This targer does not supports rich text
$data[$changeField] = strip_tags($data[$changeField], '<p>');
$data[$changeField] = str_replace('<p>', '', $data[$changeField]);
$data[$changeField] = str_replace('</p>', '\r\n', $data[$changeField]);
}

$data['_users_id_recipient'] = $_SESSION['glpiID'];
Expand Down

0 comments on commit 8d7bad0

Please sign in to comment.