Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Use SystemTextEncoding::magicDequote insteaod of decodeSecureMagic wh…
Browse files Browse the repository at this point in the history
…en handling json data, it MUST be utf-8 for json_decode function - Fix #529
  • Loading branch information
cdujeu committed Apr 16, 2014
1 parent 4102890 commit 7073265
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -153,7 +153,7 @@ public function listAllActions($action, $httpVars, $fileVars)

case "parameters_to_form_definitions" :

$data = json_decode(AJXP_Utils::decodeSecureMagic($httpVars["json_parameters"]), true);
$data = json_decode(SystemTextEncoding::magicDequote($httpVars["json_parameters"]), true);
AJXP_XMLWriter::header("standard_form");
foreach ($data as $repoScope => $pluginsData) {
echo("<repoScope id='$repoScope'>");
Expand Down Expand Up @@ -618,7 +618,7 @@ public function switchAction($action, $httpVars, $fileVars)
throw new Exception("Cant find role! ");
}

$jsonData = AJXP_Utils::decodeSecureMagic($httpVars["json_data"]);
$jsonData = SystemTextEncoding::magicDequote($httpVars["json_data"]);
$data = json_decode($jsonData, true);
$roleData = $data["ROLE"];
$forms = $data["FORMS"];
Expand Down

0 comments on commit 7073265

Please sign in to comment.