[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
WordPress Trac
noreply at wordpress.org
Thu Jul 13 11:28:05 UTC 2017
#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
-------------------------------------+-----------------------
Reporter: pento | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.8.1
Component: Emoji | Version: 4.2
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+-----------------------
Changes (by pento):
* keywords: has-patch needs-testing needs-unit-tests => has-patch needs-
testing
Comment:
In [attachment:35293.4.diff]:
- Expand the fallback regex in `wp_emoji_regex()`.
- Add unit tests.
- Improve inline docs.
I tested optimising the regex that the Gruntfile task generates, but ran
into a couple of problems - it didn't really save much space, and the code
points still need to be unravelled for the `entities` regex, as that can't
use character ranges for matching.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35293#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list