[wp-trac] [WordPress Trac] #57301: Emoji feature detection is incorrect

WordPress Trac noreply at wordpress.org
Mon Dec 12 11:23:59 UTC 2022


#57301: Emoji feature detection is incorrect
---------------------------+--------------------------------------
 Reporter:  sergiomdgomes  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Emoji          |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  javascript, performance
---------------------------+--------------------------------------

Comment (by sergiomdgomes):

 More broadly, and as food for thought, I'm not entirely sure why we're
 hardcoding arrays of hexadecimal literals, which then need to be
 transformed into a string for the tests. It seems to me that it would make
 more sense to directly include the desired code sequences as JS string
 literals and call it a day.

 Perhaps we're afraid of a contributor coming along with an editor that
 messes it up, by e.g. rewriting them to an equivalent sequence? Or perhaps
 this comes from a time when we couldn't rely on browsers supporting
 unicode characters in string literals?

 I don't think we necessarily need to change this, and I think the current
 patch works well as a forward-looking and robust solution, it just struck
 me as odd.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57301#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list