Skip to content

Commit

Permalink
webui: unitreport: prevent unnecessary escapes
Browse files Browse the repository at this point in the history
before the report did contain lines like:
"fileset": "\u003Call file-based\u003E"

Now it will be stored in the valid and intended form:
"fileset": "<all file-based>"

Also "/" will no longer be escaped (like in "Debian GNU\/Linux").
  • Loading branch information
joergsteffens authored and BareosBot committed Feb 5, 2024
1 parent d49fe24 commit 3518257
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -185,7 +185,8 @@ public function backupunitreportAction()
$response->getHeaders()->addHeaderLine('Content-Disposition', 'attachment; filename="bareos-backup-unit-report.json"');

if (isset($result)) {
$response->setContent(JSON::prettyPrint(JSON::encode($result)));
$json_backupunitreport = json_encode($result, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
$response->setContent($json_backupunitreport);
}

return $response;
Expand Down

0 comments on commit 3518257

Please sign in to comment.