Ticket #4307 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Single quotes in category name breaks Atom feeds

Reported by: Otto42 Assigned to: rob1n
Priority: high Milestone: 2.2.1
Component: General Version: 2.2
Severity: critical Keywords: has-patch
Cc:

Description

This code in function get_the_category_rss():

if ( 'atom' == $type )
	$the_list .= "<category scheme='$home' term='$category->cat_name' />";

Will cause an invalid atom feed if the category name contains a single quote (as in "Otto's category"). The cat_name needs to be passed through htmlentities (probably) to handle the quotes and other special characters.

Attachments

4307.diff (1.1 kB) - added by rob1n on 05/22/07 03:57:54.

Change History

05/21/07 19:37:53 changed by rob1n

  • owner changed from anonymous to rob1n.
  • status changed from new to assigned.

attribute_escape.

05/21/07 23:15:06 changed by rob1n

Not sure about the patch. It seems like it would work, but I figured I didn't want to double-encode it, so I grabbed the raw values for the Atom feed.

05/21/07 23:26:46 changed by rob1n

  • keywords set to has-patch 2nd-opinion.

05/21/07 23:37:03 changed by ryan

I'm not sure how convert_chars() and attribute_escape() play together either. Not using get_bloginfo_rss() means the 'get_bloginfo_rss' filter isn't called, though. We should still call that.

05/22/07 03:57:54 changed by rob1n

  • attachment 4307.diff added.

05/22/07 03:58:10 changed by rob1n

  • keywords changed from has-patch 2nd-opinion to has-patch.

05/25/07 15:55:30 changed by rob1n

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

(In [5548]) Fix Atom feeds' categories. fixes #4307