[wp-trac] [WordPress Trac] #31328: Emoji in a slug fails to display
WordPress Trac
noreply at wordpress.org
Sun Mar 15 23:51:44 UTC 2015
#31328: Emoji in a slug fails to display
------------------------------+-----------------------------
Reporter: kraftbj | Owner: pento
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.2
Component: Formatting | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: administration
------------------------------+-----------------------------
Comment (by pento):
[attachment:31328.6.diff] doesn't re-break this ticket, so no complaints
from me.
For reference, the specific problem caused by #17689 was:
* Start with no emoji terms
* Create a term as a single emoji character, note that the slug correctly
uses the character
* Create a second term with a different emoji character, the slug
incorrectly uses the character from the first term
This is reproducible for any two terms containing the same number of emoji
characters (as opposed to glyphs).
This is because we were searching for duplicates by term name. All
`utf8mb4_*` collations (prior to `utf8mb4_unicode_520_ci`) treat emoji as
being equivalent characters, so would just match the first one found. Now
that we're searching for duplicates by term term slug, this is no longer a
problem. Term slugs store the URL-encoded version of the emoji character,
which the `utf8mb4_` collations correctly interpret as a string of ASCII
text.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31328#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list