diff --git a/src/Pods/Blocks/Types/Base.php b/src/Pods/Blocks/Types/Base.php
index 5891d67b18..c17c63991a 100644
--- a/src/Pods/Blocks/Types/Base.php
+++ b/src/Pods/Blocks/Types/Base.php
@@ -270,4 +270,38 @@ public function in_editor_mode( $attributes = [] ) {
return false;
}
+
+ /**
+ * Determine whether to apply wpautop to the block content output.
+ *
+ * @since TBD
+ *
+ * @param string|mixed $content The content to determine whether to autop.
+ * @param array $attributes The Pods render attributes that will be used.
+ *
+ * @return bool Whether to apply wpautop to the block content output.
+ */
+ public function should_autop( $content, array $attributes = [] ): bool {
+ $should_autop = (
+ is_string( $content )
+ && false === strpos( $content, '
should_autop( $content, $attributes ) ) {
$content = wpautop( $content );
}
diff --git a/src/Pods/Blocks/Types/Item_List.php b/src/Pods/Blocks/Types/Item_List.php
index 869d718027..e72a05baf1 100644
--- a/src/Pods/Blocks/Types/Item_List.php
+++ b/src/Pods/Blocks/Types/Item_List.php
@@ -426,6 +426,10 @@ public function render( $attributes = [], $content = '', $block = null ) {
$attributes['filters'] = false;
}
+ if ( ! empty( $attributes['not_found'] ) && $this->should_autop( $attributes['not_found'] ) ) {
+ $attributes['not_found'] = wpautop( $attributes['not_found'], $attributes );
+ }
+
$content = pods_shortcode( $attributes, $attributes['template_custom'] );
if ( '' !== $content ) {
diff --git a/src/Pods/Blocks/Types/Related_Item_List.php b/src/Pods/Blocks/Types/Related_Item_List.php
index 93ca420ee2..c657871c06 100644
--- a/src/Pods/Blocks/Types/Related_Item_List.php
+++ b/src/Pods/Blocks/Types/Related_Item_List.php
@@ -344,6 +344,10 @@ public function render( $attributes = [], $content = '', $block = null ) {
$attributes['filters'] = false;
}
+ if ( ! empty( $attributes['not_found'] ) && $this->should_autop( $attributes['not_found'] ) ) {
+ $attributes['not_found'] = wpautop( $attributes['not_found'], $attributes );
+ }
+
$content = pods_shortcode( $attributes, $attributes['template_custom'] );
if ( '' !== $content ) {