Opened 20 years ago
Closed 18 years ago
#1464 closed defect (bug) (fixed)
wp-atom.php produces invalid enclosure
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 2.1 |
Component: | General | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
In wp-atom.php there is a call to rss_enclosure, so when an enclosure is added to a post, it outputs an enclosure element, which is invalid accoring to feedvalidator.org
Possible fix: A function like atom_enclosure could be added that would output either something like this: <content type="audio/mpeg" src="http://foo.com/foo.mp3" /> or this: <link rel="related" type="audio/mpeg" href="http://foo.com/foo.mp3" /> instead of RSS 2.0's enclosure element.
Attachments (2)
Change History (13)
#2
@
18 years ago
- Keywords needs-patch added; atom enclosures podcasting videoblogging removed
- Milestone set to 2.2
- Owner changed from anonymous to rob1n
- Status changed from new to assigned
- Version changed from 1.5.1.2 to 2.1
2.2 currently still calls rss_enclosure() for the Atom enclosure.
#3
@
18 years ago
http://atomenabled.org/developers/syndication/#link
<link rel="enclosure">. Working on patch.
#4
@
18 years ago
- Summary changed from wp-atom.php produces invalid output to wp-atom.php produces invalid enclosure
#5
@
18 years ago
- Keywords has-patch added; needs-patch removed
Patch added that includes a new function (atom_enclosure), and replaces the call to rss_enclosure() in wp-atom.php with atom_enclosure().
#8
@
18 years ago
Is the if ( is_array($val) )
really necessary, since you cast to an array in the foreach?
Also, it's missing a closing curly brace at the end.
Other than that, and the fact that we've moved the feed generation code under wp-includes recently, it appears to be fine.
#9
@
18 years ago
- Keywords has-patch removed
Heh, I just copied the code from rss_enclosure() and made it Atom-specific. I'll make a new patch.
There may not be a good solution for Atom 0.3, meaning aggregator support for enclosures in Atom 0.3 is not a standard feature. While support in aggregators may not be standard, this could be used: <link rel="related" type="audio/mpeg" href="http://foo.com/foo.mp3" /> as it does validate, which is probably better than not validating.