Update webpagetool.php
This commit is contained in:
parent
60726530f3
commit
29794f103c
|
@ -584,19 +584,10 @@ if(!check_function_exists("get_parsed_dom")) {
|
||||||
// 2018-06-01: Adaptive JSON is always quotes without escape non-ascii characters
|
// 2018-06-01: Adaptive JSON is always quotes without escape non-ascii characters
|
||||||
if(!check_function_exists("get_adaptive_json")) {
|
if(!check_function_exists("get_adaptive_json")) {
|
||||||
function get_adaptive_json($data) {
|
function get_adaptive_json($data) {
|
||||||
$result = "";
|
if(loadHelper("json.format")) {
|
||||||
$lines = array();
|
return json_encode_ex($data, array("adaptive" => true));
|
||||||
foreach($data as $k=>$v) {
|
|
||||||
if(is_array($v)) {
|
|
||||||
$lines[] = sprintf("\"%s\":%s", make_safe_argument($k), get_adaptive_json($v));
|
|
||||||
} else {
|
|
||||||
$lines[] = sprintf("\"%s\":\"%s\"", make_safe_argument($k), make_safe_argument($v));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$result = "{" . implode(",", $lines) . "}";
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2018-09-10: support webproxy
|
// 2018-09-10: support webproxy
|
||||||
|
|
Loading…
Reference in New Issue
Block a user