Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#32128 closed defect (bug) (fixed)

Emoji error loop

Reported by: obenland Owned by: azaozz
Priority: normal Milestone: 4.2.2
Component: Formatting Version: 4.2
Severity: normal Keywords: fixed-major has-patch
Cc: Focuses: javascript

Description

If the emoji scripts has to replace emojis with images but the images can't be found, twemoji replaces those images with the image's alt attribute. wp-emoji has a listener in place to then again run the emoji script over theses nodes, resulting in an infinite replacement loop. At least that's what I think happens.

Attachments (2)

32128.diff (970 bytes ) - added by obenland 11 years ago.
Probably not the most elegant solution.
32128.patch (1.0 KB ) - added by iseulde 11 years ago.

Download all attachments as: .zip

Change History (10)

@obenland
11 years ago

Probably not the most elegant solution.

#1 @DrewAPicture
11 years ago

  • Component GeneralFormatting

#2 @DrewAPicture
11 years ago

  • Keywords needs-testing added

#3 @SergeyBiryukov
11 years ago

#32157 was marked as a duplicate.

#4 @iseulde
11 years ago

The documentation says object can also be a string, so doing object.className without any other checks is not good. It's probably better to even prevent that function from executing and handle it in the mutation observer callback.

@iseulde
11 years ago

#5 @iseulde
11 years ago

The second patch is a bit more code, but should be faster, it runs earlier and less often.

#6 @azaozz
11 years ago

  • Owner set to azaozz
  • Resolutionfixed
  • Status newclosed

In 32323:

Emoji: fix loop when replacement images fail to load.
Props iseulde. Fixes #32128 for trunk.

#7 @azaozz
11 years ago

  • Keywords fixed-major added; needs-testing removed
  • Resolution fixed
  • Status closedreopened

Reopen for 4.2.

#8 @azaozz
11 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 32360:

Emoji: fix loop when replacement images fail to load.
Props iseulde. Fixes #32128 for 4.2.

Note: See TracTickets for help on using tickets.