Zend Framework

difference between atom and rss link escaping

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Zend_Feed
  • Labels:
    None

Description

snapshot : ZendFramework-20080220-8205

I ve implemented a Zend_Feed_Builder_Interface class to build my feeds.

in getEntries() i loop with new Zend_Feed_Builder_Entry($title, $url, $description);

I had to htmlentities escape $title, $url and $description... ok so far.

But if i put some & in $url it's ok in rss but it's double escaped in atom...

rss:
...
<link>http://beta.nicematin.com/ra/26/120060?utm_source=rss&amp;utm_medium=feed&amp;xtor=RSS-120&amp;</link>
...

atom:

...
<link rel="alternate" href="http://beta.nicematin.com/ra/26/120060?utm_source=rss&amp;utm_medium=feed&amp;xtor=RSS-120&amp;"/>
...

And If I do not escape I get some createElement warnings in rss :

Warning: DOMDocument::createElement() : unterminated entity reference utm_medium=feed&xtor=RSS-120& in /prod/htroot/Zend/ZendFramework-20080220-8205/library/Zend/Feed/Rss.php on line 387

it s a shame if i have to code 2 feed builders....

best regards

links : http://beta.nicematin.com/rss , http://beta.nicematin.com/atom

Activity

Hide
Wil Sinclair added a comment -

Please evaluate and categorize as necessary.

Show
Wil Sinclair added a comment - Please evaluate and categorize as necessary.
Hide
Pádraic Brady added a comment -

Unable to reproduce. This doesn't invalidate the bug, however it's likely it was fixed in a previous version.

Show
Pádraic Brady added a comment - Unable to reproduce. This doesn't invalidate the bug, however it's likely it was fixed in a previous version.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: