Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#29857 closed defect (bug) (duplicate)

Instagram oEmbeds with Emoji only content break embeds

Reported by: Ipstenu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Embeds Keywords:
Focuses: Cc:


This is not actually WordPress but I'm not sure how we would go about telling Instagram their embed is broken.


Insert an Instagram link that has emojii like http://instagram.com/p/tnZ6DfBjly/

This generates the following invalid HTML:

<p><a href="http://instagram.com/p/tnZ6DfBjly/"><img src="”http://scontent-a-lax.cdninstagram.com/hphotos-xaf1/t51.2885-15/10683883_355903761240624_2147231606_a.jpg”" alt="”</p">

Clearly they're not sanitizing something right. I filed a bug report with Instagram (linking them back to this) and it's pretty obvious this isn't us. We're just calling their code, right? Maybe we can use wordpress.org power to push this like we did with TED?

Change History (2)

#1 @SergeyBiryukov
7 years ago

  • Summary changed from Instagram oEmbeds with Emoji only conent break embeds to Instagram oEmbeds with Emoji only content break embeds

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

There's nothing wrong with the code returned by Instagram:


The issue is that the output stops at the alt attribute, leaving an unclosed quote:

<a href="http://instagram.com/p/tnZ6DfBjly/"><img src="http://photos-a.ak.instagram.com/hphotos-ak-xaf1/10683883_355903761240624_2147231606_a.jpg" alt="

And the end result gets mangled by wptexturize():

<a href="http://instagram.com/p/tnZ6DfBjly/"><img src=&#187;http://photos-a.ak.instagram.com/hphotos-ak-xaf1/10683883_355903761240624_2147231606_a.jpg&#187; alt=&#187;

It's the same issue as in #27961. The workaround suggested there works here too.

Closing as a duplicate of #21212, for the same reason as in #27961.

Note: See TracTickets for help on using tickets.