Tracker *Defect Feature Request
Subject *
Description *RSS 2.0 <category> can have one optional attribute 'domain'. It would be nice to have this available. I've rolled a test patch, this is more an explanation of what I mean than a patch, it pops it in the scheme value: <pre> Index: simplepie.inc =================================================================== --- simplepie.inc (revision 1035) +++ simplepie.inc (working copy) @@ -3300,6 +3300,20 @@ } $categories[] =& new $this->feed->category_class($term, $scheme, $label); } + foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20, 'category') as $category) + { + $term = null; + $scheme = null; + if (isset($category['data'])) + { + $term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT); + if (isset($category['attribs']['']['domain'])) + { + $scheme = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_TEXT); + } + $categories[] =& new $this->feed->category_class($term, $scheme, null); + } + } foreach ((array) $this->get_item_tags('', 'category') as $category) { $categories[] =& new $this->feed->category_class($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_TEXT), null, null); </pre> If you're in agreement it's valid attribute etc.. I'll happily roll against what ever correct version, and with appropriate standards. I note trunk is already checking for RSS2 rather than parsing all categories, but isn't looking at the attributes.
Status *Unconfirmed
Priority *Low Medium High Regression Release Critical
Assigned to Geoffrey Sneddon Michael Shipley Ryan McCue Ryan Parman Steve Minutillo
Category Autodiscovery Cache Compatibility Test Data Access Data Input Date Parsing Enclosures Error Handling HTML HTTP IRI Handling Miscellaneous Parser Sanitizer
Target version 1.0 1.0.1 1.1 1.1.1 1.1.2 1.1.3 1.2 1.2.1 1.3
Start
Due date
Estimated time Hours
% Done0 % 10 % 20 % 30 % 40 % 50 % 60 % 70 % 80 % 90 % 100 %
Files Optional description Add another file (Maximum size: 5 MB)