2

In improving the alt-texts on Mi Yodeya, I came across this odd bug while editing a question.

The picture in the post shows normally, when I'm not editing it:

Screenshot of a Mi Yodeya question, with a black and white picture of a bearded Jew wearing a skullcap

However, when editing the post, the picture disappears from the preview:

Screenshot of the same Mi Yodeya question being edited, with the picture missing from the preview

Removing the mouseover text didn't change anything. I also tried editing the post in incognito mode, to check if the issue had to do with inline editing; the same issue appeared there.

I'm using Chrome on Windows 8. This issue hasn't (as far as I could tell) occurred for any other posts I've edited recently.

  • ....this whole post was just a distraction, so I wouldn't have to come up with a description for that kippah :P – Shokhet Feb 9 '15 at 1:03
2

The inline preview is trying to convert the URL inside the alt text too. So it's producing:

<img src="http://i.stack.imgur.com/lKO97.jpg" alt="enter image description here" title="From `<a href="http://dziga.com/my-name-is-zalman-malkin/">http://dziga.com/my-name-is-zalman-malkin/</a>`" />

Which when run through the sanitizer to strip HTML oddities, ends up doing like this:

<img src="http://i.stack.imgur.com/lKO97.jpg" alt="enter image description here" title="From `<a href="http://dziga.com/my-name-is-zalman-malkin/">http://dziga.com/my-name-is-zalman-malkin/`" />

I'll also note that this is not a problem with only the preview. If you were to save an edit without changing that title to remove the link, the image would no longer show up in the actual post either. The rendered post is permanently cached until another edit is made, so this did work back in 2012, but no longer works for whatever reason. If you look at the post's revision history (which is not cached at all), you'll see the same thing that the preview is showing you.

  • Interesting. So....I should probably download the image and/or take a screenshot and upload a new image to Stack's imgur, it looks like. – Shokhet Feb 9 '15 at 1:31
  • You don't need to re-upload the image. Simply removing that URL from the title (in between the quotation marks) will fix it in the post. Even removing the http:// would be enough to render the image properly. There's nothing wrong with the image, only the syntax being used. – animuson Feb 9 '15 at 1:33
  • Got it. Thanks! – Shokhet Feb 9 '15 at 1:34
  • ....aaaand done. Thanks for your help! – Shokhet Feb 9 '15 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .