Disable wpautop on Shortcode attributes
I have a shortcode which accepts basic HTML tags as shortcode attribute.
When this shortcode is used in the shortcode block i.e within !-- wp:shortcode --
then unbalanced p
tags are added to the shortcode attribute.
If it is used normally, then no p
tags are added.
Are there any workarounds which can be done to avoid this issue ?
function abcd_shortcode( $atts ){
print_r( $atts );
}
add_shortcode('abcd', 'abcd_shortcode');
Output (notice the /p
and p
tags added for no reason in the second array)
Array
(
[html] = h4Hey/h4Outside
)
Array
(
[html] = /p
h4Hey/h4
pInside
)