[wp-trac] [WordPress Trac] #62354: fetch_feed should use `get_bloginfo( 'charset' )` over `get_option( 'blog_charset' )` when setting the output encoding
WordPress Trac
noreply at wordpress.org
Sat Nov 9 00:32:45 UTC 2024
#62354: fetch_feed should use `get_bloginfo( 'charset' )` over `get_option(
'blog_charset' )` when setting the output encoding
--------------------------+---------------------
Reporter: david.binda | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Feeds | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Changes (by azaozz):
* milestone: 6.7.1 => 6.7
Comment:
After
[https://wordpress.slack.com/archives/C07BTF54N68/p1731111748627109?thread_ts=1731111104.510989&cid=C07BTF54N68
chatting] with @peterwilsoncc moving to 6.7 for consideration.
An alternative (perhaps a bit safer?) patch would be to hard-code this
directly in `fetch_feed()`. Replace `$feed->set_output_encoding(
get_option( 'blog_charset' ) );` with:
{{{
$blog_charset = get_option( 'blog_charset' );
if ( empty( $blog_charset ) ) {
$blog_charset = 'UTF-8';
}
$feed->set_output_encoding( $blog_charset );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62354#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list