Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rich description encoding in ticket #775

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ public function pre_deleteItem() {
* @return Ticket|null Generated ticket if success, null otherwise
*/
public function save(PluginFormcreatorForm_Answer $formanswer) {
global $DB;
global $DB, $CFG_GLPI;

// Prepare actors structures for creation of the ticket
$this->requesters = [
Expand Down Expand Up @@ -1084,7 +1084,9 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
$data['content'] = str_replace('##FULLFORM##', $formanswer->getFullForm(), $data['content']);
}
$data['content'] = addslashes($this->parseTags($data['content'], $formanswer));

if ($CFG_GLPI['use_rich_text']) {
$data['content'] = htmlentities($data['content']);
}
$data['_users_id_recipient'] = $_SESSION['glpiID'];
$data['_tickettemplates_id'] = $this->fields['tickettemplates_id'];

Expand Down