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)
Change History (10)
#4
@
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.
#5
@
11 years ago
The second patch is a bit more code, but should be faster, it runs earlier and less often.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Probably not the most elegant solution.