[box id=’1′ text=”some texte”]
the shortcode, at one point is outputting text
the html result is : </p> some text </p>
There is an extra closing paragraph in the start and and opening at the end… WHY ?
where those come from ?…. any idea ?.. it screw my w3 validation !
** note i have found that… but look all “patched” to me…any clean solution… wp is dirty ? reference
I discover that it’s a know bug, and will be fix in future release Reference here So then, i used this code… not pretty, but do the magic !, thanks
I had the same problem and checked the $content in the add_filter() function. There you can see what happen with the shortcodes. I ended up with an easy plugin, that removes silly p and br tags on shortcodes:
http://www.johannheyne.de/wordpress/shortcode-empty-paragraph-fix/
Make sure there is a double line-break before and after the shortcode in the editor;
When using a shortcode in the block editor, I had a really hard time removing extra p tags until I used the “Custom HTML” block and inserted the shortcode in there.
Hope this helps someone out there like me.