Do not escape slashes in log json
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
049628a3f5
commit
29a6f2d830
|
@ -90,12 +90,12 @@ abstract class LogDetails {
|
||||||
// them manually.
|
// them manually.
|
||||||
foreach($entry as $key => $value) {
|
foreach($entry as $key => $value) {
|
||||||
if(is_string($value)) {
|
if(is_string($value)) {
|
||||||
$testEncode = json_encode($value);
|
$testEncode = json_encode($value, JSON_UNESCAPED_SLASHES);
|
||||||
if($testEncode === false) {
|
if($testEncode === false) {
|
||||||
$entry[$key] = utf8_encode($value);
|
$entry[$key] = utf8_encode($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return json_encode($entry, JSON_PARTIAL_OUTPUT_ON_ERROR);
|
return json_encode($entry, JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_UNESCAPED_SLASHES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue