Title: Post title XHTML validation error
Last modified: August 18, 2016

---

# Post title XHTML validation error

 *  [eyn](https://wordpress.org/support/users/eyn/)
 * (@eyn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/post-title-xhtml-validation-error/)
 * So, I upgraded to WordPress 2.0, everything looks good so far, but some XHTML
   validation error that does not happen before happen now, which is kinda annoying.
 * First of all, post title is not properly parsed. I have a post which title is“
   Bold&Delicious”, and it gives me validation error when I try to validate my post.
   Obviously, WP2 do not change & into “& amps;”. Also, another post title called“
   YUI’s “LIFE”” gives me validation error when it is rendered by the theme as ”
   title=”YUI’s “LIFE”” “, see how it works?
 * These problems are not found in WP1.5, so is this a bug for WP2.0? I’m thinking
   of adding htmlentities or htmlspecialchars to $title in “template-function-post.
   php” in order to fix this problem, any suggestion?
 * Thanks for the feedback, much appreciated!

Viewing 1 replies (of 1 total)

 *  Thread Starter [eyn](https://wordpress.org/support/users/eyn/)
 * (@eyn)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/post-title-xhtml-validation-error/#post-325212)
 * I realized the problem lies on “comments_popup_link” functions. When getting 
   post title to be used, the functions takes the title directly from the database
   without parsing it with htmlspecialchars. Here’s a way to fix it:
 * – open “comment-functions.php” in wp-includes folder
    – find function “comment_popup_link”–
   change “sprintf( __(‘Comment on %s’), $post->post_title ) ” to “sprintf( __(‘
   Comment on %s’), htmlspecialchars($post->post_title) )”
 * btw, isn’t this considered as a WordPress 2.0 bug?

Viewing 1 replies (of 1 total)

The topic ‘Post title XHTML validation error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [eyn](https://wordpress.org/support/users/eyn/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/post-title-xhtml-validation-error/#post-325212)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
