[wp-trac] [WordPress Trac] #16456: Extra brake tags in get_the_password_form() output

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 4 16:56:56 UTC 2011


#16456: Extra brake tags in get_the_password_form() output
-------------------------+-------------------------------------------------
 Reporter:  ABTOP        |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  normal       |    Version:
Component:  Formatting   |   Keywords:  password, extra brake tags in
 Severity:  normal       |  get_the_password_form, wpautop
-------------------------+-------------------------------------------------
 The brief explanation of the problem:
 http://wordpress.org/support/topic/extra-in-get_the_password_form

 Upon further investigation, I was able to determine that the culprit is
 actually the wpautop() function (file wp-includes/formatting.php), line
 188 - $allblocks - as of wp3.1 RC3:

 {{{
 function wpautop($pee, $br = 1) {

         if ( trim($pee) === '' )
                 return '';
         $pee = $pee . "\n"; // just to make things a little easier, pad
 the end
         $pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
         // Space things out a little
         $allblocks =
 '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';
 }}}

 The output from get_the_password_form() goes through wpautop() and extra
 <br /> tags are inserted before each <input> tag.

 I hope this is not a feature.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16456>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list