← All changes
|
jetpack_vendor/automattic/jetpack-sync/src/class-json-deflate-array-codec.php
+5
-1
13.4.5
→
16.3-a.7
View file →
| @@ -7,8 +7,12 @@ | ||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | namespace Automattic\Jetpack\Sync; |
| 10 | 10 | |
| 11 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 12 | + exit( 0 ); | |
| 13 | +} | |
| 14 | + | |
| 11 | 15 | /** |
| 12 | 16 | * An implementation of Automattic\Jetpack\Sync\Codec_Interface that uses gzip's DEFLATE |
| 13 | 17 | * algorithm to compress objects serialized using json_encode |
| 14 | 18 | */ |
| @@ -56,9 +60,9 @@ | ||
| 56 | 60 | * |
| 57 | 61 | * @return false|string |
| 58 | 62 | */ |
| 59 | 63 | protected function json_serialize( $any ) { |
| 60 | - return wp_json_encode( Functions::json_wrap( $any ) ); | |
| 64 | + return wp_json_encode( Functions::json_wrap( $any ), JSON_UNESCAPED_SLASHES ); | |
| 61 | 65 | } |
| 62 | 66 | |
| 63 | 67 | /** |
| 64 | 68 | * Unserialize JSON |