fix: [API] don't html encode JSON documents

- earlier fix broke shit
- sometimes we pass the type as json sometimes as application/json to the response class, which handles it cleanly - but the check only accounted for one case
pull/9764/head
iglocska 2024-06-04 11:41:35 +02:00
parent 33a1eb6640
commit 565b6a68c1
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 1 additions and 1 deletions

View File

@ -648,7 +648,7 @@ class RestResponseComponent extends Component
} else {
$prettyPrint = !$this->isAutomaticTool(); // Do not pretty print response for automatic tools
$response = JsonTool::encode($response, $prettyPrint);
if ($format !== 'json') {
if ($format !== 'json' && $format !== 'application/json') {
$response = h($response);
}
}