Title: nested paragraphs in comment post errors
Last modified: May 27, 2019

---

# nested paragraphs in comment post errors

 *  Resolved [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/)
 * Hi,
    This is probably wrong. Line 30 in ‘wordpress/wp-comments-post.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.
 * `$message = "<p>$message</p>"`
 * I would suggest removing the paragraph in ‘wp-comments-post.php’. Simply `$comment-
   >get_error_message()` ought to do.
 * I hope I’m not nitpicking.
 * edit: I just realized this might be the wrong forum, although perhaps the issue
   described can be fixed by the next release?
    -  This topic was modified 7 years, 4 months ago by [Tom](https://wordpress.org/support/users/tnbnicer/).
    -  This topic was modified 7 years, 4 months ago by [Tom](https://wordpress.org/support/users/tnbnicer/).
    -  This topic was modified 7 years, 4 months ago by [Tom](https://wordpress.org/support/users/tnbnicer/).

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11577575)
 * Could you write a ticket? (search for existing first)
    [https://core.trac.wordpress.org/](https://core.trac.wordpress.org/)
 * It helps to have references directly to the code, which is easy from the Code
   Reference. (there are links to browse on Trac)
 * [https://developer.wordpress.org/reference/functions/_default_wp_die_handler/](https://developer.wordpress.org/reference/functions/_default_wp_die_handler/)
   
   [https://core.trac.wordpress.org/browser/tags/5.2/src/wp-comments-post.php](https://core.trac.wordpress.org/browser/tags/5.2/src/wp-comments-post.php)
 *  Thread Starter [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11578249)
 * [https://core.trac.wordpress.org/ticket/47413#ticket](https://core.trac.wordpress.org/ticket/47413#ticket)
 * I guess it isn’t resolved (yet) as long as the ticket is still open?
 *  Thread Starter [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11579741)
 * Resolved.
 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11580040)
 * Someone supplied a patch, but it hasn’t been reviewed or tested or built in to
   WordPress yet.
 *  Thread Starter [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11581075)
 * An interesting question is how nested paragraphs managed to slip through the 
   net. The earliest instance of **‘<p>’ . $comment->get_error_message() . ‘</p>’**
   I found occurred in 4.53. **$message = “<p>$message</p>”** in ‘functions.php’
   has been there longer.
 * I don’t know what the patch is, but what can go wrong?
    -  This reply was modified 7 years, 4 months ago by [Tom](https://wordpress.org/support/users/tnbnicer/).
    -  This reply was modified 7 years, 4 months ago by [Tom](https://wordpress.org/support/users/tnbnicer/).
 *  Thread Starter [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11581376)
 * The patch is: **$comment->get_error_message(),**
 * I believe it is safe and we’ll likely be seeing it, and no more nested tags, 
   in the next WordPress release hopefully.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11581468)
 * We mark posts that have trac tickets as resolved for sanity. It lets mods and
   volunteers know we don’t have to jump in and find an issue. You should follow
   the discussion on trac. You can click the ‘Watch’ button on the trac ticket (
   it’s near the bottom) to get email alerts. If you need to log in, it’s the same
   ID/password as you use for the forums.
 *  Thread Starter [Tom](https://wordpress.org/support/users/tnbnicer/)
 * (@tnbnicer)
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11581532)
 * I marked the post as resolved after the patch. It took about three or four hours
   for someone to respond and supply the patch. Anyone can check on the ticket.
 * I’m glad everything works.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11582219)
 * Yeah that was because Joy pointed out the ticket wasn’t closed yet. You did the
   right thing, Tom!

Viewing 9 replies - 1 through 9 (of 9 total)

 The topic ‘nested paragraphs in comment post errors’ is closed to new replies.

 * In: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
 * 9 replies
 * 3 participants
 * Last reply from: [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * Last activity: [7 years, 4 months ago](https://wordpress.org/support/topic/nested-paragraphs-in-comment-post-errors/#post-11582219)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
