From 5c66f564c2d2a74e116d113ef41a0694331207dc Mon Sep 17 00:00:00 2001 From: Scott Kingsley Clark Date: Sat, 16 Mar 2024 21:23:43 -0500 Subject: [PATCH] Strip non-content attributes of HTML formatting --- src/Pods/WP/Bindings.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Pods/WP/Bindings.php b/src/Pods/WP/Bindings.php index 482d6191e3..e8aca97b0e 100644 --- a/src/Pods/WP/Bindings.php +++ b/src/Pods/WP/Bindings.php @@ -4,8 +4,6 @@ use Pods\Blocks\Types\Field; use WP_Block; -use Pods\Whatsit\Pod; -use PodsForm; /** * Bindings specific functionality. @@ -93,7 +91,14 @@ public function get_value( $source_args, $block_instance, $attribute_name ) { return ''; } - return $field_block->render( $source_args, '', $block_instance ); + $value = $field_block->render( $source_args, '', $block_instance ); + + // Only support full HTML for the content attribute. + if ( 'content' !== $attribute_name ) { + $value = wp_strip_all_tags( $value ); + } + + return $value; } }