[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
WordPress Trac
noreply at wordpress.org
Mon Jul 18 10:19:21 UTC 2016
#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
--------------------------+-----------------------------
Reporter: pento | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Emoji | Version: 4.2
Severity: normal | Resolution:
Keywords: emoji | Focuses:
--------------------------+-----------------------------
Comment (by ocean90):
Replying to [comment:6 pento]:
> The best I have is to add a `grunt build` rule to update the regex based
on the current regex in `twemoji.js`. That's pretty fragile, though -
changes to `twemoji.js`'s formatting would break it. In theory, it would
only break when updating `twemoji.js`, so maybe it wouldn't be too bad?
I don't think that this is a big issue, the current formatting
[https://github.com/twitter/twemoji/blob/v1.0.0/twemoji.js#L224 exists
since version 1.0.0]. We could also write our own task to generate the
regex: https://github.com/twitter/twemoji/blob/v2.1.0/twemoji-
generator.js#L214-L263
----
In [attachment:35293.2.patch] I added support for diversity, doesn't work
for new Emoji though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35293#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list