Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
fix(api): timeperiod API response without HTML encoding (#6380)
Browse files Browse the repository at this point in the history
Resolve CP7M-105
Ref #6359
  • Loading branch information
vhr authored Jun 20, 2018
1 parent d7e3e2a commit 0bd0510
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/api/class/centreon_configuration_timeperiod.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getList()
while ($data = $stmt->fetch()) {
$timePeriodList[] = array(
'id' => $data['tp_id'],
'text' => $data['tp_name']
'text' => html_entity_decode($data['tp_name']),
);
}
return array(
Expand Down
4 changes: 2 additions & 2 deletions www/api/class/webService.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ public static function sendResult($data, $code = 200, $format = null)
break;
case static::RESULT_JSON:
case null:
header('Content-type: application/json');
print json_encode($data);
header('Content-type: application/json;charset=utf-8');
print json_encode($data, JSON_UNESCAPED_UNICODE);
break;
}

Expand Down

0 comments on commit 0bd0510

Please sign in to comment.