[wp-trac] [WordPress Trac] #47413: nested paragraphs in comment post errors

WordPress Trac noreply at wordpress.org
Tue May 28 05:32:48 UTC 2019


#47413: nested paragraphs in comment post errors
--------------------------+-----------------------------
 Reporter:  tnbnicer      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  5.2.1
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 Line 30 in ‘wordpress/wp-comments-post.php’:

 {{{#!php
 <?php
 '<p>' . $comment->get_error_message() . '</p>'
 }}}

 An example of the Html code generated:


 {{{
 <p><p><strong>ERROR</strong>: please fill the required fields (name,
 email).</p></p>
 }}}

 The reason is that in function **_default_wp_die_handler**, line 3072 in
 ‘wordpress/wp-includes/functions.php’ (WordPress 5.2.1), there already is
 a paragraph tag.

 {{{#!php
 <?php
 $message = "<p>$message</p>"
 }}}

 I would suggest removing the paragraph in ‘wp-comments-post.php’. Simply:

 {{{#!php
 <?php
 $comment->get_error_message()

 }}}

 ought to do.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47413>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list