Try making a new post, pasting this string of emojis: "🐻🐝🐦🐈🐔🐄🦀🐕🐬🐘🐟🐸🐐🐎🐒🐼🐖🐑🐟🐢🐳" and then saving that post as a draft. When I do this (in WP version 4.7.4), it removes the emojis.

First I create the post:

enter image description here

After clicking "Save Draft":

enter image description here

The culprit here seems to be the crab emoji:🦀 If you take it out the the emoji string everything works fine. I'm guessing this is a bug where wordpress isn't handling new emojis properly? Can anyone help me disable the "sanitisation" that's causing this (if it's safe)?

It's strange that wordpress removes all the emojis when the crab emoji is present. I think it's got to do with the 2015 unicode 8.0 update because I tested it with the scorpion emoji which also came with that update and it causes the same problem.

P.S. I wasn't sure on the correct tags, please let me know if there are more appropriate ones.

Edit: Note that this isn't a rendering problem since the characters are actually gone (not just invisible or something) - they've been filtered out at some point in the save process.

  • how do you insert them? – Mark Kaplun Apr 30 '17 at 9:41
  • ... and generally if somethign expected to work and it isn't on a vanilla wordpress, the best thing to do is to open a bug in the wordpress trac – Mark Kaplun Apr 30 '17 at 9:43
  • I'm not sure what you mean - I just copied them and pasted them into the post (they're unicode characters, not images). Yeah, I actually tried to report this but for some reason it wouldn't let me login (or reset my password). I'd appreciate it it someone could post it as an official bug report. I don't urgently need a fix - I mainly posted it here as a bug report and to help others who come across similar issues. – user118721 Apr 30 '17 at 10:34
  • it works for me in 4.7.4. First I was wondering about the font in your editor (it’s not Merriweather). Please set it to default and test it again. And: What’s about your database charset (should be UTF8)? Please check your wp-config (DB_CHARSET). – s t Apr 30 '17 at 10:38
  • @st Hmm that's strange - maybe it isn't a bug then. Thanks for checking. It's using utf8mb4. I'm not sure what you mean by "set it to default"? I haven't changed it (didn't know you could), but also, how could the wordpress editor font affect the ability to save certain unicode characters? Fonts are just visual, right? It seems to be set to "Noto Serif" by default (from inspecting css). – user118721 Apr 30 '17 at 11:24

You need to upgrade your database and table charsets to utf8mb4 (WordPress 4.2+’s default). I’ll not provide instructions as to how to do this beyond “backup first and diff and compare pre and post database dumps!” Set aside enough time to recover from any trouble.

I had the exact same problems as you, and fixed it by upgrading to a database charset that actually supports 4-bit emojis.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy