Spoilers not working for external images

Tried.

[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]

[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]

[spoiler][img]https://i.imgur.com/zJ4M8Fx.jpg[/img][/spoiler]

PS: the pic is very lewd be careful when you click it.

http://try.discourse.org/t/testing-spoiler/348

One of our community members reported me about this spoiler not working. After few tests on my community. The image uploaded to my discourse over there the spoiler works perfectly, but external image links do not work.

3 Likes

Testing

As of now still does not work, apologies for a second post.

That’s because you’re doing

[spoiler]https://i.imgur.com/zJ4M8Fx.jpg[/spoiler]

instead of

[spoiler]
https://i.imgur.com/zJ4M8Fx.jpg
[/spoiler]

URLs need to start and be on their own line to onebox

EDIT
Sorry. Now I see what you mean. The URL should show beneath the spoiler without it trying to onebox and fail.

1 Like

Thanks, I am currently on 1.5 beta 14. I have a question, is the stable version also facing the same problem?

I don’t know, I always run Master.

I shifted to stable and i can confirm that the spoiler issue is still the same.

1 Like

Works for me, and works on my locale too!

Maybe fetch and rebase master branch?

The link is under a spoiler not an image. That is an image, it should be under spoiler.

1 Like

If you want an image under the spoiler it needs to be done as I earlier showed.
i.e.
spoiler tag
image URL
end spoiler tag

not
spoiler tag image URL end spoiler tag
on one line

1 Like

Yes that works perfectly. But if i am not wrong, the image was under spoiler directly when
spoiler tag image URL end spoiler tag :question:

1 Like

I think that this is a markdown problem, the maintainers are going to move to a new markdown engine, i don’t know when, but @sam and @codinghorror did tell me that several times on some other bug topics… maybe is that

Hmm yeah this seems impossible at the moment.

https://blog.codinghorror.com/content/images/2017/06/discourse-download-all.png

by itself. But spoilered?

1 Like

Aha after it auto-downloads remote image, it works, but not before.

1 Like

Maybe @sam wants to add this bug to CommonMark testing started here! ?

Not sure what the bug is?

[spoiler][img]//assets-meta-cdck-prod-meta.s3.dualstack.us-west-1.amazonaws.com/original/3X/3/e/3eb3f65132c7443887f24613ec04cd82a633d5ce.jpg[/img][/spoiler]

Let me see:

https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg

As a spoiler:

[spoiler]https://blog.codinghorror.com/content/images/2017/01/help-keep-your-school-all-american.jpg[/spoiler]

I think it has to do with the size of the remote image, such that it won’t be downloaded locally.

I think it’s a onebox edge case… very easy to work around

Off-topic:

I’m impressed that you posted that image already 2 weeks ago considering that the idea is trending only now on twitter… :hushed:

2 Likes