WordPress auto adds p to shortcode parameters

WordPress auto adds p tags around shortcode parameters. Is there any way to stop this ?

function minimum_working_example ( $atts, $content ){
extract(shortcode_atts(array(
‘html’ => ”,
), $atts));

return ‘<span data-html=”‘.$html.'”></span>’;
}

shordcode call:

[min_example html='<ul>stuff</ul>’]

what ends up being rendered:

<span data-html=”

<ul>stuff</ul>
<p>”></span>

desired output is something along the lines of:

<span data-html=”<ul>stuff</ul>”></span>

Read more here:: WordPress auto adds p to shortcode parameters

Leave a Reply

Your email address will not be published. Required fields are marked *