Ticket #2625 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Posts with double-quote in title cause malformed XML

Reported by: thetorpedodog Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.0.2
Severity: major Keywords: xml malformed comment template bg|has-patch bg|commit
Cc:

Description

Steps to reproduce

1. Set up your blog to send as application/xhtml+xml, for instance with WP Content Negotiator.

2. Ensure that there is a comments_popup_link present on your homepage.

3. Write a post featuring a "double quote" somewhere in the title.

4. Go to your blog homepage.

5. In Mozilla/Firefox: Yellow Screen of Death, whatever happens happens in Opera

Fix

line 315, wp-includes/comment-functions.php

CHANGE:

		echo ' title="' . sprintf( __('Comment on %s'), $post->post_title ) .'">';

TO:

		echo ' title="' . apply_filters('the_title',sprintf( __('Comment on %s'), $post->post_title )) .'">';

Attachments

2625.diff (0.5 kB) - added by davidhouse on 04/02/06 09:04:05.
escape_title.diff (0.6 kB) - added by markjaquith on 06/15/06 02:37:00.
patch for /branches/2.0/
TRUNK_escape_title.diff (0.5 kB) - added by markjaquith on 06/15/06 02:40:26.

Change History

04/02/06 09:04:05 changed by davidhouse

  • attachment 2625.diff added.

04/02/06 09:04:24 changed by davidhouse

  • keywords changed from xml malformed comment template to xml malformed comment template bg|has-patch bg|needs-testing.

Try that patch.

04/04/06 05:14:59 changed by thetorpedodog

  • keywords changed from xml malformed comment template bg|has-patch bg|needs-testing to xml malformed comment template bg|has-patch bg|works.

Works for me.

04/04/06 06:53:48 changed by davidhouse

  • keywords changed from xml malformed comment template bg|has-patch bg|works to xml malformed comment template bg|has-patch bg|commit.

06/15/06 02:37:00 changed by markjaquith

  • attachment escape_title.diff added.

patch for /branches/2.0/

06/15/06 02:40:26 changed by markjaquith

  • attachment TRUNK_escape_title.diff added.

06/15/06 07:31:33 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [3873]) Specialchars title. Props David House and Mark Jaquith. fixes #2625

06/15/06 07:32:09 changed by ryan

  • status changed from closed to closed.
  • resolution set to fixed.

(In [3874]) Specialchars title. Props David House and Mark Jaquith. fixes #2625

07/26/06 22:17:24 changed by haxxor

  • version changed from 2.0.2 to 2.0.3.

Just notifying: this bug has not been fixed in 2.0.3.

07/26/06 22:18:35 changed by haxxor

  • version changed from 2.0.3 to 2.0.2.

Oops, didn't mean to change version.

07/27/06 07:17:19 changed by ryan

It should be fixed in the 2.0.4 beta. Are you testing with the 2.0.4 beta?