[wp-trac] [WordPress Trac] #27961: Twitter auto-embed fails if tweet contains Emoji icon
WordPress Trac
noreply at wordpress.org
Tue Jun 17 20:19:59 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:
--------------------------+------------------------
Comment (by jeremyclarke):
Note that this can also apply to post_content if a tweet is embedded
directly in a post (as we should all do if we want the fallback blockquote
to keep working after Twitter is gone), thus cutting off the entire post
after the emoji.
To fix that you'll want to also filter wp_insert_post_data, something
like:
{{{
add_filter( 'wp_insert_post_data',
'filter_insert_post_data_utf8mb4_27961', '', 2 );
}}}
While testing it seemed to work by just applying
'replace_4byte_characters_27961' to wp_insert_post_data, but just in case
I made a callback specifically for wp_insert_post_data which only filtered
post_content.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27961#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list