diff --git a/pandora_console/godmode/massive/massive_edit_plugins.php b/pandora_console/godmode/massive/massive_edit_plugins.php index 1d11290084..276dd3f424 100644 --- a/pandora_console/godmode/massive/massive_edit_plugins.php +++ b/pandora_console/godmode/massive/massive_edit_plugins.php @@ -58,7 +58,7 @@ if (is_ajax()) { } } - echo json_encode($plugin); + echo io_json_mb_encode($plugin); return; } @@ -97,7 +97,7 @@ if (is_ajax()) { $agents[] = $current_element; } - echo json_encode($agents); + echo io_json_mb_encode($agents); return; } @@ -125,7 +125,7 @@ if (is_ajax()) { }, array()); - echo json_encode($module_plugin_macros); + echo io_json_mb_encode($module_plugin_macros); return; } @@ -225,7 +225,7 @@ if ($update) { - $module_macros = json_encode($result_macros, JSON_FORCE_OBJECT); + $module_macros = io_json_mb_encode($result_macros, JSON_FORCE_OBJECT); if (empty($module_macros)) { $module_macros = $module_macros_str; } diff --git a/pandora_console/include/functions_io.php b/pandora_console/include/functions_io.php index 3114aa6e44..79a089f27a 100755 --- a/pandora_console/include/functions_io.php +++ b/pandora_console/include/functions_io.php @@ -431,8 +431,8 @@ function __ ($string /*, variable arguments */) { * * @param string Text string to be encoded. */ -function io_json_mb_encode($string) { - $v = json_encode($string); +function io_json_mb_encode($string, $encode_options = 0){ + $v = json_encode($string, $encode_options); $v = preg_replace_callback("/\\\\u([0-9a-zA-Z]{4})/", create_function('$matches', 'return mb_convert_encoding(pack("H*", $matches[1]), "UTF-8", "UTF-16");' ), $v);