ZF-10246: Tag URIs Incorrectly Considered Invalid as Atom Entry IDs

Issue Type: Bug Created: 2010-07-29T12:53:01.000+0000 Last Updated: 2010-08-01T12:58:24.000+0000 Status: Resolved Fix version(s): - 1.10.8 (25/Aug/10)

Reporter: Bradley Holt (bradley.holt) Assignee: Pádraic Brady (padraic) Tags: - Zend_Feed_Writer

Related issues: Attachments:


When using Zend_Feed_Writer to create an Atom feed and attempting to use a tag URI such as:,2010:/foo/bar/

The following exception is raised:

"Atom 1.0 IDs must be a valid URI/IRI"

Please allow tag URIs to be used as Atom Entry IDs within Zend_Feed_Writer as these are valid URIs. There are probably other valid URIs that are incorrectly marked as invalid as well since Zend_Feed_Writer appears to only consider Uniform Resource Name (URN) URIs to be valid, but URN is only a subset of URI.

For reference: *… *


Posted by Pádraic Brady (padraic) on 2010-07-29T15:34:42.000+0000

Hey Bradley,

Unfortunately Zend_Uri (used for validation in Zend_Feed and almost everywhere else in ZF for URIs) is essentially Zend_Url - so all URIs outside of URLs and URNs (already a custom addition) require custom validation code. It's something I'm monitoring for ZF2 whenever someone starts digging into Zend\Uri. I'll see what support can be added on an ad-hoc basis over the weekend, though it will be limited to tag: and a few others of more common interest.

Posted by Bradley Holt (bradley.holt) on 2010-07-30T07:38:13.000+0000


All I really need (at least right now) is support for tag URIs (I'm creating a feed based on existing entries in another feed, so I don't have a choice as to what kind of IDs to use). Simply allowing tag URIs will work for me and solve my problem. Maybe provide an option to skip ID validation until full URI validation is available? Just a thought, but that might be a bad idea.

Posted by Pádraic Brady (padraic) on 2010-08-01T06:01:41.000+0000

Fixed in r22753. Bradley, let me know if this works for you. Note that email checking (if part of the URI) does not perform MX checks. Fix will be ported to ZF 2.0 shortly.

Posted by Bradley Holt (bradley.holt) on 2010-08-01T11:27:18.000+0000


The issue I was having was with Atom Entries, not Atom Feeds (my feeds have URLs as IDs). Can you add that same validation for tag URIs in Zend_Feed_Writer_Renderer_Entry_Atom?

Posted by Pádraic Brady (padraic) on 2010-08-01T12:25:53.000+0000

Added in r22758. At least, I like to think so. It is, isn't it? Please? Pretty please? ;)

Posted by Bradley Holt (bradley.holt) on 2010-08-01T12:58:22.000+0000


Yay! You are the best :-)

I'll mark this as closed once the next mini release is out.

Have you found an issue?

See the Overview section for more details.


© 2006-2021 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.