[wp-trac] [WordPress Trac] #46143: UTF8 typo, but
WordPress Trac
noreply at wordpress.org
Wed Jan 30 08:19:27 UTC 2019
#46143: UTF8 typo, but
--------------------------+-----------------------------
Reporter: masterross | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Charset | Version: 5.0.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Hi,
It looks like there is a typo (bug) in function wp_encode_emoji()
in line 5125 on /wp-includes/formatting.php :
{{{#!php
<?php
function wp_encode_emoji( $content ) {
$emoji = _wp_emoji_list( 'partials' );
foreach ( $emoji as $emojum ) {
if ( version_compare( phpversion(), '5.4', '<' ) ) {
$emoji_char = html_entity_decode( $emojum,
ENT_COMPAT, 'UTF-8' );
} else {
$emoji_char = html_entity_decode( $emojum );
}
if ( false !== strpos( $content, $emoji_char ) ) {
$content = preg_replace( "/$emoji_char/", $emojum,
$content );
}
}
return $content;
}
}}}
{{{
'<' should be '>'
}}}
I found it when I check our error log filled with:
{{{
UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
[29-Jan-2019 16:05:16 UTC] PHP Warning: html_entity_decode(): charset
`UTF-8;’ not supported, assuming utf-8 in /home/ladylen/public_html/blog
/wp-includes/formatting.php on line 5125
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46143>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list