← All changes
|
modules/kit-elements-defaults/utils/settings-sanitizer.php
+7
-2
4.2.1
→
3.35.0-dev2
View file →
| @@ -4,9 +4,8 @@ | ||
| 4 | 4 | use Elementor\Core\Breakpoints\Manager as Breakpoints_Manager; |
| 5 | 5 | use Elementor\Element_Base; |
| 6 | 6 | use Elementor\Elements_Manager; |
| 7 | 7 | use Elementor\Core\Base\Document; |
| 8 | -use Elementor\Utils; | |
| 9 | 8 | |
| 10 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | 10 | exit; // Exit if accessed directly. |
| 12 | 11 | } |
| @@ -121,9 +120,15 @@ | ||
| 121 | 120 | if ( ! $this->is_prepared() ) { |
| 122 | 121 | return $this; |
| 123 | 122 | } |
| 124 | 123 | |
| 125 | - $this->pending_settings = Utils::kses_post_deep( $this->pending_settings ); | |
| 124 | + $this->pending_settings = map_deep( $this->pending_settings, function( $value ) { | |
| 125 | + if ( ! is_string( $value ) ) { | |
| 126 | + return $value; | |
| 127 | + } | |
| 128 | + | |
| 129 | + return wp_kses_post( $value ); | |
| 130 | + } ); | |
| 126 | 131 | |
| 127 | 132 | return $this; |
| 128 | 133 | } |
| 129 | 134 | |