Ampersand incorrectly encoded in onebox images


I’ve noticed that some links aren’t loading on the Discourse I help administer.

This one, for instance:

The same thing happens here, so I’m assuming it is something which some sites are doing differently?

Everything looks fine here:

Any ideas?

It is completely normal and has no errors

That’s weird. When I first wrote the post, the preview didn’t show the image. This is what happens on the Discourse instance I mentioned…

Just that black box.

It’s because the target source image is incorrectly http and your site is https. The image has to be copied over and mirrored locally as https, and this takes time. Not a bug.

If you want to get people to fix it, nag the target site to properly support https…


Thank you, Jeff.

With this URL…

…the broken image has this link:

When I paste that link into the message box I see this:

And the link for that image is:

Where are all those '&amp’s coming from in the first link (the image link generated by Onebox, I think…)

Thanks in advance for any insight.

1 Like

Is this related to character encoding?

Ah, maybe you’re right. I’ve definitely seen this behavior with http images, but perhaps the image encoding for the original onebox is incorrect, and somehow corrected once the image is downloaded? I suppose any image with ampersands in the URL would be affected this way, so that’s how to repro… what do you think @techapj?


This one is an example of the behaviour with http images:

This is the broken link:

Works fine when you change it to https manually:

Discourse is awesome, by the way.


Right that one will also get fixed by local download in a bit.


Mmm, that thumbnail is working now, here, but on the Discourse I’m helping with, it still isn’t showing…

This issue is now fixed via:


Thank you, @techAPJ. Do I need to do anything to get the update?

Updating to latest version should be enough.