[wp-trac] Re: [WordPress Trac] #8405: WordPress produces invalid comment feeds

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 13 23:22:20 GMT 2008


#8405: WordPress produces invalid comment feeds
---------------------+------------------------------------------------------
 Reporter:  ossguy   |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  normal   |    Milestone:  2.8      
Component:  General  |      Version:  2.7      
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Comment (by paulchenpanther):

 Replying to [comment:2 schlafbaum]:
 > Solution: wrapping translation in html_entity_decode like: feed-
 rss2-comments.php, line 21: instead of: printf(__('Comments on: %s',
 ENT_QUOTES, get_option('blog_charset')));

 I simply can't figure out how this solves ossguy's problem:

 * html_entity_decode() replaces & by &. For the problem to be solved,
 this has to be done the other way round, hence htmlentites() may be used.

 * The problem resides inside the link()-element. The proposed solution
 does not change anything inside that element.

 My suggestion:

 Replace
 {{{
 function comment_link() {
         echo get_comment_link();
 }
 }}}
 by
 {{{
 function comment_link() {
         echo htmlentities(get_comment_link());
 }
 }}}
 in wp-includes/feed.php (around line 254).

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


More information about the wp-trac mailing list