Emoji: Test Emoji 17 support with the correct UTF-16 pair for Hairy Creature - #13515
Jiwoon-Kim wants to merge 1 commit into
Conversation
…reature. The Emoji 17 support test drew a string written with a five-digit Unicode escape, which JavaScript reads as a lone high surrogate, U+1FAC and the digit 8 rather than U+1FAC8. It renders with an empty center point, so browsers that support Emoji 17 were reported as not supporting it, and every emoji was replaced with images instead of only flags. Follow-up to [61134]. See #66104.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
peterwilsoncc
left a comment
There was a problem hiding this comment.
This looks good to me and is testing well. As noted on the ticket I have confirmed the updated codepoint is correct.
Testing notes:
- Visit playground.wordpress.net (ie, running WP production release)
- Create a new post
- Copy in emoji pile below
- Publish post
- View post on front end
- Observe the emoji are replaced with the fallbacks
- Visit playground link on this PR
- Create emoji pile post, publish and view on front end
- Observe the emoji are not replaced with the fallbacks.
Testing device
- Browser: Firefox 155.0
- OS: macOS 26.6.2
Emoji pile
🧑🩰 🧑🏻🩰 🧑🏼🩰 🧑🏽🩰 🧑🏾🩰 🧑🏿🩰 👯🏻 🧑🏻🐰🧑🏼 🧑🏻🐰🧑🏽 🧑🏻🐰🧑🏾 🧑🏻🐰🧑🏿 👯🏼 🧑🏼🐰🧑🏻 🧑🏼🐰🧑🏽 🧑🏼🐰🧑🏾 🧑🏼🐰🧑🏿 👯🏽 🧑🏽🐰🧑🏻 🧑🏽🐰🧑🏼 🧑🏽🐰🧑🏾 🧑🏽🐰🧑🏿 👯🏾 🧑🏾🐰🧑🏻 🧑🏾🐰🧑🏼 🧑🏾🐰🧑🏽 🧑🏾🐰🧑🏿 👯🏿 🧑🏿🐰🧑🏼 🧑🏿🐰🧑🏻 🧑🏿🐰🧑🏽 🧑🏿🐰🧑🏾 👯🏻♂️ 👨🏻🐰👨🏼 👨🏻🐰👨🏽 👨🏻🐰👨🏾 👨🏻🐰👨🏿 👯🏼♂️ 👨🏼🐰👨🏻 👨🏼🐰👨🏽 👨🏼🐰👨🏾 👨🏼🐰👨🏿 👯🏽♂️ 👨🏽🐰👨🏻 👨🏽🐰👨🏼 👨🏽🐰👨🏾 👨🏽🐰👨🏿 👯🏾♂️ 👨🏾🐰👨🏻 👨🏾🐰👨🏼 👨🏾🐰👨🏽 👨🏾🐰👨🏿 👯🏿♂️ 👨🏿🐰👨🏻 👨🏿🐰👨🏼 👨🏿🐰👨🏽 👨🏿🐰👨🏾 👯🏻♀️ 👩🏻🐰👩🏼 👩🏻🐰👩🏽 👩🏻🐰👩🏾 👩🏻🐰👩🏿 👯🏼♀️ 👩🏼🐰👩🏻 👩🏼🐰👩🏽 👩🏼🐰👩🏾 👩🏼🐰👩🏿 👯🏽♀️ 👩🏽🐰👩🏻 👩🏽🐰👩🏼 👩🏽🐰👩🏾 👩🏽🐰👩🏿 👯🏾♀️ 👩🏾🐰👩🏻 👩🏾🐰👩🏼 👩🏾🐰👩🏽 👩🏾🐰👩🏿 👯🏿♀️ 👩🏿🐰👩🏻 👩🏿🐰👩🏼 👩🏿🐰👩🏽 👩🏿🐰👩🏾 🤼🏻 🧑🏻🧑🏼 🧑🏻🧑🏽 🧑🏻🧑🏾 🧑🏻🧑🏿 🤼🏼 🧑🏼🧑🏻 🧑🏼🧑🏽 🧑🏼🧑🏾 🧑🏼🧑🏿 🤼🏽 🧑🏽🧑🏻 🧑🏽🧑🏼 🧑🏽🧑🏾 🧑🏽🧑🏿 🤼🏾 🧑🏾🧑🏻 🧑🏾🧑🏼 🧑🏾🧑🏽 🧑🏾🧑🏿 🤼🏿 🧑🏿🧑🏻 🧑🏿🧑🏼 🧑🏿🧑🏽 🧑🏿🧑🏾 🤼🏻♂️ 👨🏻👨🏼 👨🏻👨🏽 👨🏻👨🏾 👨🏻👨🏿 🤼🏼♂️ 👨🏼👨🏻 👨🏼👨🏽 👨🏼👨🏾 👨🏼👨🏿 🤼🏽♂️ 👨🏽👨🏻 👨🏽👨🏼 👨🏽👨🏾 👨🏽👨🏿 🤼🏾♂️ 👨🏾👨🏻 👨🏾👨🏼 👨🏾👨🏽 👨🏾👨🏿 🤼🏿♂️ 👨🏿👨🏻 👨🏿👨🏼 👨🏿👨🏽 👨🏿👨🏾 🤼🏻♀️ 👩🏻👩🏼 👩🏻👩🏽 👩🏻👩🏾 👩🏻👩🏿 🤼🏼♀️ 👩🏼👩🏻 👩🏼👩🏽 👩🏼👩🏾 👩🏼👩🏿 🤼🏽♀️ 👩🏽👩🏻 👩🏽👩🏼 👩🏽👩🏾 👩🏽👩🏿 🤼🏾♀️ 👩🏾👩🏻 👩🏾👩🏼 👩🏾👩🏽 👩🏾👩🏿 🤼🏿♀️ 👩🏿👩🏻 👩🏿👩🏼 👩🏿👩🏽 👩🏿👩🏾
The Emoji 17 support test in
emoji-loader.jsdraws'\uD83E\u1FAC8'. Because\utakes exactly four hex digits, that string is a lone high surrogate, U+1FAC and the digit8, not U+1FAC8 HAIRY CREATURE. It renders with an empty center point, so the test reports Emoji 17 as unsupported even in browsers that support it;emojiis then false,everythingExceptFlagis false as well, andwp-emoji.jsreplaces every emoji with images instead of only flags.This uses the correct UTF-16 pair,
'\uD83E\uDEC8', and corrects the comment. The malformed string was introduced with the Twemoji 17.0.1 update in [61134] (#64184) and is present in 6.9, 7.0, 7.1 and trunk; 6.8 tested'\uD83E\uDEDF'.Testing: there is no JS unit test for the loader, so Core's own support-test functions (
testEmojiSupports()and the helpers it calls) were extracted from trunk and from this branch and run in the same browser (Windows 11, Chromium 152). Trunk returns{ flag: false, emoji: false }, so every emoji is replaced; this branch returns{ flag: false, emoji: true }, so only flags are replaced, which is whateverythingExceptFlagis for. Both runs used the sameOffscreenCanvaspath.wp-scripts lint-jsandjshintpass on the changed file.Trac ticket: https://core.trac.wordpress.org/ticket/66104
Use of AI Tools
This pull request was prepared with Claude Code (Anthropic). It located the defect, wrote the fix, and ran the browser comparison and lint checks locally.