[wp-trac] [WordPress Trac] #27961: Twitter auto-embed fails if tweet contains Emoji icon

WordPress Trac noreply at wordpress.org
Tue Apr 22 10:08:53 UTC 2014


#27961: Twitter auto-embed fails if tweet contains Emoji icon
--------------------------+------------------------
 Reporter:  MortimerCat   |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Embeds        |     Version:  3.9
 Severity:  normal        |  Resolution:  duplicate
 Keywords:                |     Focuses:  ui
--------------------------+------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch =>


Comment:

 Related: #13590

 A workaround:
 {{{
 function replace_4byte_characters_callback( $match ) {
         return ( strlen( $match[0] ) < 4 ) ? $match[0] : '';
 }

 function replace_4byte_characters_27961( $output ) {
         // https://core.trac.wordpress.org/ticket/27961
         return preg_replace_callback( '/./u',
 'replace_4byte_characters_callback', $output );
 }
 add_filter( 'oembed_result', 'replace_4byte_characters_27961' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27961#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list