[wp-trac] [WordPress Trac] #7563: html_entity_decode at RSS Feed import doesn't respect charset of Blog

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 21 10:58:59 GMT 2008


#7563: html_entity_decode at RSS Feed import doesn't respect charset of Blog
-------------------------+--------------------------------------------------
 Reporter:  codestyling  |       Owner:  anonymous
     Type:  defect       |      Status:  new      
 Priority:  high         |   Milestone:  2.6.2    
Component:  General      |     Version:           
 Severity:  critical     |    Keywords:           
-------------------------+--------------------------------------------------
 '''Error:''' If the dashboard rss or the rss widgets imports feeds with
 content containing german special chars like '''ä''' equal to '''ä'''
 this results into display of �[[BR]]


 '''Solution:''' Using ''get_option('blog_charset')'' solves the correct
 display of feed content.


 file: wp-admin/includes/dashboard.php


 line: 431



 {{{
 $description = wp_specialchars(
 strip_tags(html_entity_decode($item['description'], ENT_QUOTES,
 get_option('blog_charset'))) );
 }}}




 file: wp-includes/widgets.php


 lines: 1130 and 1132




 {{{
 if ( isset( $item['description'] ) && is_string( $item['description'] ) )
                                 $desc = $summary = str_replace(array("\n",
 "\r"), ' ',
 attribute_escape(strip_tags(html_entity_decode($item['description'],
 ENT_QUOTES, get_option('blog_charset')))));
                         elseif ( isset( $item['summary'] ) && is_string(
 $item['summary'] ) )
                                 $desc = $summary = str_replace(array("\n",
 "\r"), ' ',
 attribute_escape(strip_tags(html_entity_decode($item['summary'],
 ENT_QUOTES, get_option('blog_charset')))));

 }}}

 Using the blog charset the feed content will be shown qualified depending
 on blogs configuration!

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7563>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list