Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not an Issue
-
Affects Version/s: 1.6.1
-
Fix Version/s: None
-
Component/s: Zend_Feed
-
Labels:None
Description
I want to create feeds with HTML content and I assume the content should go into the content key of an entry element. I would like to leave the description (which creates a summary tag in the generated feed) empty, because it's not required. The documentation says it's required:
http://framework.zend.com/manual/en/zend.feed.importing.html
But the RFC says:
atom:entry elements MUST contain an atom:summary element in either of the following cases:
- the atom:entry contains an atom:content that has a "src" attribute (and is thus empty).
- the atom:entry contains content that is encoded in Base64; i.e., the "type" attribute of atom:content is a MIME media type [MIMEREG], but is not an XML media type [RFC3023], does not begin with "text/", and does not end with "/xml" or "+xml".
It also says:
It is not advisable for the atom:summary element to duplicate atom:title or atom:content because Atom Processors might assume there is a useful summary when there is none.
It should be allowed to create atom feeds without the summary but with the content element.
Another problem exists with RSS feeds. RSS does not have any summary elements, so the description element is used for all content. The manual says it the 'short version of a feed entry' and html is not allowed in it. Bus there's no other way to create html entries in rss feeds. The RSS specification allows html to be used with escaped entities. That means that one should escape the 'description' of an rss feed entry and not escape a 'description' (which is a summary) of an atom feed entry. I would suggest, that Zend_Feed should automatically escape descriptions if it's creating a RSS feed. (maybe I should create another issue for this one?)
The quoted rules ignore prevailing practice in RSS where content is managed through a separate extension to the core RSS rules. In this event, a description can contain almost anything escaped or not (e.g. plain text). The reason the rules are not strictly enforced is that the component can only guess at the author's intent and this may lead to unexpected consequences, like redundant escaping or double escaping.
Given the age of Zend_Feed, changing such a basic behaviour (for good or ill) also represents a backwards compatibility break.
For these reasons, the issue either doesn't require fixing (it's acceptable practice under RSS, if barely) or would reverse a long standing behaviour leading to widespread code breakage.