-
Notifications
You must be signed in to change notification settings - Fork 4.1k
AMP should respect ⚡️ apart from ⚡ #25990
Copy link
Copy link
Closed
Description
Both ⚡️ and ⚡ look the same, but they're different:
'⚡️'.length;
// 2
'⚡'.length;
// 1
'⚡'.charCodeAt(0) + ' ' + '⚡'.charCodeAt(1);
// "9889 NaN"
'⚡️'.charCodeAt(0) + ' ' + '⚡️'.charCodeAt(1);
// "9889 65039"AMP respects the ⚡but rejects ⚡️, which is confusing since the macOS emoji picker creates ⚡️, that is, the representation with the Unicode Variation Selector-16.
The AMP validator checks for the presence of the representation without Variation Selector-16, but then replaces it with amp, the same happens on the AMP cache.
To avoid this confusion, AMP could potentially allow for both, ⚡️ and ⚡, and then just replace them with the textual attribute amp.
More background on this bug: https://blog.tomayac.com/2019/12/12/same-same-but-different-unicode-variation-selector-16/.
Reactions are currently unavailable
