← All changes
|
jetpack_vendor/automattic/jetpack-stats/src/class-xmlrpc-provider.php
+7
-3
13.6.2
→
16.3
View file →
| @@ -95,11 +95,14 @@ | ||
| 95 | 95 | ); |
| 96 | 96 | $blog = array_merge( Options::get_options(), $blog ); |
| 97 | 97 | unset( $blog['roles'], $blog['blog_id'] ); |
| 98 | 98 | |
| 99 | - add_filter( 'esc_html', array( $this, 'filter_esc_html_check_if_string' ), 10, 2 ); | |
| 100 | - $blog = map_deep( $blog, 'esc_html' ); | |
| 101 | - remove_filter( 'esc_html', array( $this, 'filter_esc_html_check_if_string' ) ); | |
| 99 | + $blog = map_deep( | |
| 100 | + $blog, | |
| 101 | + function ( $value ) { | |
| 102 | + return is_string( $value ) ? esc_html( $value ) : $value; | |
| 103 | + } | |
| 104 | + ); | |
| 102 | 105 | |
| 103 | 106 | return $blog; |
| 104 | 107 | } |
| 105 | 108 | |
| @@ -106,8 +109,9 @@ | ||
| 106 | 109 | /** |
| 107 | 110 | * Make sure we are only escaping html if the input is a string. |
| 108 | 111 | * Used for `esc_html` filter-hook. |
| 109 | 112 | * |
| 113 | + * @deprecated since 0.20.3 | |
| 110 | 114 | * @param string $safe_text The output after esc_html has been applied. |
| 111 | 115 | * @param mixed $text The initial input. |
| 112 | 116 | * @return mixed |
| 113 | 117 | */ |