Update webpagetool.php

This commit is contained in:
Namhyeon Go 2019-04-01 11:33:09 +09:00 committed by GitHub
parent 6486e87dc0
commit a2c20bed27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -525,9 +525,9 @@ if(!check_function_exists("get_adaptive_json")) {
$lines = array();
foreach($data as $k=>$v) {
if(is_array($v)) {
$lines[] = sprintf("\"%s\":%s", addslashes($k), get_adaptive_json($v));
$lines[] = sprintf("\"%s\":%s", make_safe_argument($k), get_adaptive_json($v));
} else {
$lines[] = sprintf("\"%s\":\"%s\"", addslashes($k), addslashes($v));
$lines[] = sprintf("\"%s\":\"%s\"", make_safe_argument($k), make_safe_argument($v));
}
}
$result = "{" . implode(",", $lines) . "}";
@ -548,7 +548,7 @@ if(!check_function_exists("get_webproxy_url")) {
if(!check_function_exists("get_web_user_agent")) {
function get_web_user_agent($ua="") {
if(empty($ua)) {
$ua = "ReasonableFramework/1.2 (https://github.com/gnh1201/reasonableframework)";
$ua = "ReasonableFramework/1.2-dev (https://github.com/gnh1201/reasonableframework)";
} else {
$ua = make_safe_argument($ua);
}