Opened 15 years ago
Closed 10 years ago
#10713 closed defect (bug) (fixed)
Output encoding not set in fetch_feed
Reported by: | iansealy | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | 4.3 | Priority: | normal |
Severity: | normal | Version: | 2.8.4 |
Component: | Feeds | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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.
Attachments (4)
Change History (12)
Note: See
TracTickets for help on using
tickets.
Instead of pasting the diff directly, please attach it as a file.