[wp-trac] [WordPress Trac] #14050: shortcode_unautop() should also remove the <br /> added after shortcodes

WordPress Trac noreply at wordpress.org
Sun Feb 15 14:20:54 UTC 2015


#14050: shortcode_unautop() should also remove the <br /> added after shortcodes
-----------------------------------+-----------------------------
 Reporter:  aaroncampbell          |       Owner:  aaroncampbell
     Type:  defect (bug)           |      Status:  assigned
 Priority:  normal                 |   Milestone:  Future Release
Component:  Formatting             |     Version:  3.0
 Severity:  normal                 |  Resolution:
 Keywords:  needs-refresh wpautop  |     Focuses:
-----------------------------------+-----------------------------

Comment (by squarestar):

 Please take a look at this solution: https://github.com/szepeviktor
 /wordpress-plugin-construction/blob/master/mu-shortcode-unautop/shortcode-
 unautop.php

 It seems to me that it addresses the issue of nested shortcodes not having
 their `<p>` tags removed - at least the problem that led me here is
 resolved by replacing the regex in `shortcode_unautop()` with the one in
 that file, though it doesn't look to my un-regex-experienced eyes as
 though it tackles `<br>` tags.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14050#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list