[wp-trac] Re: [WordPress Trac] #3884: the_content_rss() is used incorrectly in wp-rdf.php, wp-rss2.php and wp-atom.php

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 7 05:34:42 GMT 2007


#3884: the_content_rss() is used incorrectly in wp-rdf.php, wp-rss2.php and wp-
atom.php
----------------------+-----------------------------------------------------
 Reporter:  jeroyang  |        Owner:  anonymous
     Type:  defect    |       Status:  new      
 Priority:  normal    |    Milestone:  2.2      
Component:  General   |      Version:  2.1.1    
 Severity:  normal    |   Resolution:           
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by jhodgdon):

 Note that the "weird things" are only happening in the_content_rss under
 some circumstances. The latest suggested fix sets the last ($encode_html)
 input argument to 3, and the 4th ($cut) argument to 0, which basically
 circumvents all the weirdness.

 With those inputs, the_content_rss function is basically just doing
 get_the_content (which is unfiltered), then filtering using
 "the_content_rss" filter, then making sure any ]]> strings are escaped
 with entities.

 The above note about not filtering with "the_content" seems on the mark to
 me. But my concern would be that adding "the_content" as a filter to
 the_content_rss might break something else. I suppose it could be added
 only if $encode_html had the value of 3 (previously unused).

 One other note: the suggested fixes above will need to be added to
 different files on different lines. As of trunk SVN 4984, all the content
 of the 3 files mentioned above has been moved into corresponding files in
 wp-includes:

 wp-includes/feed-rss2.php wp-includes/feed-atom.php  wp-includes/feed-
 rdf.php


 Thoughts?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3884#comment:4>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list