PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
← All changes | includes/utils.php +8 -4 4.2.3 → 4.5.6 View file →
@@ -55,14 +55,18 @@
55 55 * Validate an HTML tag against a safe allowed list.
56 56 * @param string $tag
57 57 * @return string
58 58 */
59 - public static function get_valid_html_tag( $tag ) {
60 - return in_array( strtolower( $tag ), self::ALLOWED_HTML_WRAPPER_TAGS ) ? $tag : 'div';
59 + public static function get_valid_html_tag( $tag ) {
60 + if ( ! is_scalar( $tag ) ) {
61 + return 'div';
62 + }
63 +
64 + return in_array( strtolower( (string) $tag ), self::ALLOWED_HTML_WRAPPER_TAGS ) ? $tag : 'div';
61 65 }
62 66
63 - public static function print_valid_html_tag( $tag ) {
64 - echo esc_attr( in_array( strtolower( $tag ), self::ALLOWED_HTML_WRAPPER_TAGS ) ? $tag : 'div' );
67 + public static function print_valid_html_tag( $tag ) {
68 + echo esc_attr( self::get_valid_html_tag( $tag ) );
65 69 }
66 70
67 71 /**
68 72 * Get placeholder image source.