shortcode_unautop() should also remove the <br /> added after shortcodes
|Reported by:||aaroncampbell||Owned by:|
|Severity:||normal||Keywords:||dev-feedback 3.3-early needs-refresh|
|Cc:||aaroncampbell, pauldewouters, mdhansen@…|
Currently wpautop() wraps a shortcode in <p> tags as well as adding a <br /> tag after the shortcode. We then use shortcode_unautop() to remove the <p> tags, but the <br /> stays.
To replicate, just drop a few caption shortcodes into a post and set them all to align left or right. You'll see that even though they all float (assuming that's how your theme handles them) they stair step down because of the extra <br />
I'm not a regex expert so someone should probably double check my patch, but it seems to work for me.
Change History (18)
- Keywords needs-unit-tests removed
- Keywords 3.3-early added; needs-testing removed
- Milestone changed from 3.2 to Future Release