From 6fc7ffc920bc70a4e714162c831642ed581e9575 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Fri, 19 Feb 2016 12:13:17 +0100 Subject: [PATCH] use proper JSON in mediaupload response. fixes #1474 --- lib/exe/ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index 1c1b5f03f..b3e9a618f 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -303,7 +303,8 @@ function ajax_mediaupload(){ ); } $json = new JSON; - echo htmlspecialchars($json->encode($result), ENT_NOQUOTES); + header('Content-Type: application/json'); + echo $json->encode($result); } /** -- GitLab