From 68d90a4fa6d59a6e98f27a0da49c9763a3775ee0 Mon Sep 17 00:00:00 2001 From: Osma Suominen Date: Tue, 29 Oct 2024 14:58:51 +0200 Subject: [PATCH] don't HTML encode quotes in REST API callback, to fix ONKI Selector --- controller/RestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/RestController.php b/controller/RestController.php index 1aadd8946..9f07ec3cb 100644 --- a/controller/RestController.php +++ b/controller/RestController.php @@ -25,7 +25,7 @@ private function returnJson($data) // wrap with JSONP callback if requested if (filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS)) { header("Content-type: application/javascript; charset=utf-8"); - echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS) . "(" . json_encode($data) . ");"; + echo filter_input(INPUT_GET, 'callback', FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_NO_ENCODE_QUOTES) . "(" . json_encode($data) . ");"; return; }