[wp-trac] [WordPress Trac] #37761: wp_encode_emoji misses 🆑 (U+1F191)

WordPress Trac noreply at wordpress.org
Mon Aug 22 05:15:58 UTC 2016


#37761: wp_encode_emoji misses 🆑 (U+1F191)
--------------------------+-----------------------------
 Reporter:  thrica        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Emoji         |    Version:  4.6
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I have code that enters tweets into both a Tweets table and a transient.
 I'd neglected to convert wp_options to utf8mb4 – which hadn't been a
 problem until this character slipped through wp_encode_emoji, so
 everything's been reduced to fiery wreckage now. Actually it just failed
 silently, but I did max out my allowed calls to the Twitter API.

 It succeeded in the utf8mb4 Tweets table though, which is how I know it
 didn't convert that character.

 I see in the docs that wp_encode_emoji supports up to Unicode 7, but this
 character is part of the Unicode 6 spec. The hex bytes are F0 9F 86 91, so
 it's getting missed by the \xF0\x9F[\x85-\x88][\xA6-\xBF] regex line (wp-
 includes/formatting.php, line 5033) which is supposed to catch the
 Enclosed Characters block. I suppose this means there are a few others
 between 86 91 and 86 A6 it's missing too.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37761>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list