From 0a9bd53d2dccf49e7193f2901201166ba5d9cc0b Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 2 Dec 2020 18:06:34 +0100 Subject: [PATCH] RestApi: no escaping for unicode and slashes fixes #2243 --- doc/82-Changelog.md | 2 ++ library/Director/Web/Controller/Extension/RestApi.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index e3d9a868..45686fca 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -52,6 +52,7 @@ before switching to a new version. * FEATURE: Property Modifier Reject/Select: improve usability (#2228) * FEATURE: Property Modifier: clone rows for every entry of an Array (#2192) * FEATURE: Property Modifier: unique array values (#2229) +* FEATURE: Property Modifier: allow to rename columns (#2242) * FEATURE: Import Sources now allows downloading previewed data as JSON (#2096) * FEATURE: REST API Import now allows custom headers (#2132) * FEATURE: REST API Import can now extract nested properties (#2132) @@ -90,6 +91,7 @@ before switching to a new version. * FEATURE: Self Service API ignores empty/missing properties (e.g. no address) * FEATURE: Search is now also available for the REST API (#1889) * FEATURE: Deployment Status is now available (#2187) +* FEATURE: UTF-8 characters and slashes are no longer escaped (#2243) ### Self Service API * FIX: error handling has been fixed (#1728) diff --git a/library/Director/Web/Controller/Extension/RestApi.php b/library/Director/Web/Controller/Extension/RestApi.php index 91a2cae7..3158f496 100644 --- a/library/Director/Web/Controller/Extension/RestApi.php +++ b/library/Director/Web/Controller/Extension/RestApi.php @@ -83,7 +83,7 @@ trait RestApi protected function sendJson(Response $response, $object) { $response->setHeader('Content-Type', 'application/json', true); - echo json_encode($object, JSON_PRETTY_PRINT) . "\n"; + echo json_encode($object, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "\n"; } /**