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
(cherry picked from commit 68d90a4)
  • Loading branch information
osma committed Oct 29, 2024
1 parent 4fd4c5e commit 15d2760
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 15d2760

Please sign in to comment.