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

WordPress Trac noreply at wordpress.org
Wed Nov 20 22:28:19 UTC 2013


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

Comment (by lkraav):

 Replying to [comment:14 SergeyBiryukov]:
 > `shortcode_unautop()` was rewritten in [18952], however the associated
 test still fails:
 > {{{
 > 1) Tests_Shortcode::test_multiple_shortcode_unautop
 > Failed asserting that two strings are equal.
 > --- Expected
 > +++ Actual
 > @@ @@
 > -'[footag]
 > -[footag]
 > +'<p>[footag]<br />
 > +[footag]</p>
 >  '
 > }}}

 This is really bugging a few of my projects, so I'm trying to attack the
 following. Not sure yet if the underlying problem is the same as for the
 quoted.

 {{{
 2) Tests_Shortcode::test_shortcode_unautop_html
 Failed asserting that two strings are equal.
 --- Expected
 +++ Actual
 @@ @@
  '<h1>Fun, safe, small group tours & no roughing it</h1>
 -
 -[footag]
 -
 -Enjoy guided day walks in extraordinary natural areas. Return to
 comfortable accommodation and delicious meals each evening. No heavy
 backpack, no camping.
 -
 -[/footag]'
 +[footag]</p>
 +<p>Enjoy guided day walks in extraordinary natural areas. Return to
 comfortable accommodation and delicious meals each evening. No heavy
 backpack, no camping.</p>
 +<p>[/footag]
 +'
 }}}


 {{{

--
Ticket URL: <http://core.trac.wordpress.org/ticket/14050#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list