Skip to content

Commit

Permalink
don't HTML encode quotes in REST API callback, to fix ONKI Selector
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Oct 29, 2024
1 parent 99e134f commit 68d90a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/RestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 68d90a4

Please sign in to comment.