[wp-trac] [WordPress Trac] #10713: Output encoding not set in fetch_feed
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 1 15:56:16 UTC 2009
#10713: Output encoding not set in fetch_feed
--------------------------+-------------------------------------------------
Reporter: iansealy | Owner: azaozz
Type: defect (bug) | Status: new
Priority: low | Milestone: Unassigned
Component: Widgets | Version: 2.8.4
Severity: normal | Keywords: SimplePie
--------------------------+-------------------------------------------------
If using WP Super Cache (or a similar plugin) on a blog with a non-UTF-8
charset that has an RSS widget then the charset is incorrectly changed to
UTF-8 by SimplePie.
The fix is to explictly set the encoding in fetch_feed before SimplePie
sends any headers (which it only does if WP Super Cache is being used,
since it checks if any headers have already been sent).
{{{
*** live/wp-includes/feed.php 2009-05-25 11:13:48.000000000 +0200
--- dev/wp-includes/feed.php 2009-09-01 17:40:19.000000000 +0200
***************
*** 552,557 ****
--- 552,558 ----
$feed->set_file_class('WP_SimplePie_File');
$feed->set_cache_duration(apply_filters('wp_feed_cache_transient_lifetime',
43200));
$feed->init();
+ $feed->set_output_encoding(get_option('blog_charset'));
$feed->handle_content_type();
if ( $feed->error() )
}}}
I've put this as low priority since I guess most blogs use UTF-8 and don't
use WP Super Cache.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10713>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list