[wp-meta] [Making WordPress.org] #3838: Editing Descriptions that contain emoji's strip the emoji

Making WordPress.org noreply at wordpress.org
Wed Jun 19 11:57:12 UTC 2019


#3838: Editing Descriptions that contain emoji's strip the emoji
-----------------------------+---------------------
 Reporter:  garrett-eclipse  |       Owner:  (none)
     Type:  defect           |      Status:  new
 Priority:  normal           |   Milestone:
Component:  Trac             |  Resolution:
 Keywords:                   |
-----------------------------+---------------------

Comment (by dd32):

 Turns out that this isn't even a Trac bug, it's a combination Twemoji or
 WordPress Emoji issue.

 The tl;dr of it is, the
 [https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/wp/emoji.js?marks=160#L90
 WordPress Emoji MutationObserver] calls `twemoji.parse()` with a
 `textarea` node, which causes `twemoji.grabAllTextNodes()` to fetch all
 the subnodes of a `textarea` node, and not skip `textarea` as it "should".

 I'm debating on if it's a twemoji or WordPress Emoji bug (leaning towards
 the latter) as I think twemoji is doing exactly what is wanted, processing
 Emoji's within an element that's usually skipped but doing so because it's
 been told to process that exact node.
 On the other hand, maybe it's unexpected that passing a skipped node to
 `twemoji.parse()` should process it..

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/3838#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list