• I upgraded to WordPress 2.0 yesterday, and now my site can’t pass the W3C validator. My titles usually contains a pair a quotes. This example, a post called Title with Quotes “Word”, is oddly outputted. The title stops at the quotes and continues on after the href. I’m not sure if this is a bug or not, but did anyone find a fix? I don’t remember this happening in 1.5.

    <a title="Comment on Title with Quotes " href="https://www.example.com/archives/2006/01/03/title-with-quotes-word/#respond" word??>Comments (0)</a>

Viewing 1 replies (of 1 total)
  • I was having this problem too – and I think I found the following fix:

    1. Open up wp-includes/comment-functions.php and look for the comments_popup_link() function body.

    2. Find the following line:
    echo ‘ title=”‘ . sprintf( __(‘Comment on %s’), $post->post_title ) .'”>’;

    and change it to:
    echo ‘ title=”‘ . htmlspecialchars(sprintf( __(‘Comment on %s’), $post->post_title )) .'”>’;

    This fixed the problem for me (using WordPress 2.0.3).

Viewing 1 replies (of 1 total)
  • The topic ‘Quotes in titles causing comment link problem’ is closed to new replies.