Code editor stripping out emojis

Hi, it seems the new code editor is stripping out or breaking emojis, which as we all know, is a critical website feature. :stuck_out_tongue_winking_eye:

Before save:

After save:

Oddly, the emojis still appear on the front end sometimes, but I am not sure what the pattern is with this. I also tried using the Raw tag, but it made no difference.

Is this expected behaviour?



But actually, I just tested this on a pretty vanilla site with very few plugins installed and I’m able to create and save L&L templates that contain emojis both saved and inline in the builder without any issues. I wonder if there’s some other plugin on your site that’s causing a conflict and causing L&L to scrap emojis when you save your template. Any chance you could do the old turn-off-all-your-plugins test?


It’s a national emergency in emoji land. :joy:

Anyway, I have done some more testing and disabled all plugins except for ACF.

I’ve narrowed this down to a Chrome browser issue, as the template editor renders fine in Firefox. It also looks like everything saves okay to the database.

@benjamin, did you test using Firefox?

Chrome with no plugins active:

Firefox with no plugins active:

Some other things I noticed with Chrome only:

I had no idea there was an emoji shortcut in Windows, I’m going to use that all the time now haha!

I had been testing this in Brave (Chromium) but just to be completely sure I tested it in a guest window of Chrome which is about as vanilla as you can get and emojis stuck around no problem. I’m really not sure what could be causing this but I’m still not able to replicate it.

Could it be a browser extension interfering somehow?

Since the emojis are getting saved, it sounds like an issue with displaying them correctly. This might be a browser-compatibility issue with the CodeMirror editor library. I searched in their discussion forum and issue tracker on GitHub, but didn’t see any similar reports.

Oof, seems like an elusive bug that’s hard to track down, sometimes called a Heisenbug.

So maybe we can narrow this down to Chrome/Chromium with or without ACF. Could be some kind of CSS glitch, though I think these days browser-specific CSS issues are getting less common.

@eliot considering other Chromium browsers don’t exhibit this behavior, my guess is it’s something really specific to the configuration of this computer/browser, like a browser extension or something.

I have tested a vanilla WordPress install with only L&L active, but the issue still occurs.

There are some low-level errors in the console, but they may be unrelated:

I can only test on one machine right now, so it could be a local issue and not worth further investigation unless replicated. :slight_smile:

The workaround is to edit the template in another app and copy and paste it into L&L.