From 6fd41509f28290d217a2c9995341215944d31916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?schplurtz=20le=20d=C3=A9boulonn=C3=A9?=
 <schplurtz@laposte.net>
Date: Thu, 27 Oct 2011 14:14:19 +0200
Subject: [PATCH] Use JSON wrapper in image upload (FS#2345)

---
 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 d4ef8dc11..f8d62cb57 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -281,7 +281,8 @@ function ajax_mediaupload(){
         }
         $result = array('error' => $msg['msg'], 'ns' => $NS);
     }
-    echo htmlspecialchars(json_encode($result), ENT_NOQUOTES);
+    $json = new JSON;
+    echo htmlspecialchars($json->encode($result), ENT_NOQUOTES);
 }
 
 function dir_delete($path) {
-- 
GitLab