[wp-trac] [WordPress Trac] #10509: feed-rss2.php tests for $post->post_content without applying the_content filters
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 29 07:07:12 UTC 2009
#10509: feed-rss2.php tests for $post->post_content without applying the_content
filters
--------------------------+-------------------------------------------------
Reporter: nateomedia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Feeds | Version: 2.9
Severity: normal | Keywords: rss 2, rss, feed, the_content, post_content
--------------------------+-------------------------------------------------
feed-rss2.php contains an if statement that tests to see if
$post->post_content is greater than zero before using the_content (which
may be changed to the_content_rss) to populate the <content: encoded> tag.
feed-rss2..php, line 48:
{{{
<?php if ( strlen( $post->post_content ) > 0 ) : ?>
}}}
No other RSS feed does this.
The problem is that this test does not take into account the_content
filters, which may populate an otherwise empty post. The ComicPress theme
is a real world instance where this occurs -- posts containing comics are
populated using apply_filters to the_content rather than through direct
entry when a new post is created.
If the RSS 2 feed template is to behave differently than the other feeds,
it should at least apply the_content filters before testing for content
rather than pulling directly from $post->post_content.
Otherwise, the RSS 2 feed template should be brought in line with the
other feed templates and this test should be removed.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10509>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list