Output encoding not set in fetch_feed
|Reported by:||iansealy||Owned by:|
|Cc:||scribu@…, iansealy, mdhansen@…|
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.
Change History (7)
- Cc scribu@… added
- Component changed from Widgets to Feeds
- Milestone changed from Unassigned to Future Release
- Owner azaozz deleted