What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

Problem

This code,

![“Are you coming to bed? —I can’t. This is important. —What? —Someone is _wrong_ on the Internet.”](http://i.stack.imgur.com/nXAfo.png)

renders correctly in preview as an embedded image. But after posting it no longer renders correctly. Instead it renders as a text fragment:

wrong on the Internet.”">

Demonstration

Open the this post in the editor and see how the following code renders in the preview:

wrong on the Internet.”">

Workaround

Avoid the underline character. This code renders correctly after posting:

![“Are you coming to bed? —I can’t. This is important. —What? —Someone is -wrong- on the Internet.”](http://i.stack.imgur.com/nXAfo.png)

Discussion

I suppose underlines in the image description are mistaken for Markdown. In the image description they really should be taken as literals (or at least ignored); regardless, they should not cause the sort of rendering error shown above.

share|improve this question
    
I guess it's strongly related to Link with double-underscored word in URL renders incorrectly and Fail of markdown parser detected if '_ 's are used in a naked URL (the latter being status-declined). –  Arjan Feb 20 '13 at 21:21
    
As an aside: I wonder if formatting in alt-text is ever useful? –  Arjan Feb 20 '13 at 21:23
    
Given that the code renders properly in preview, just not after post, I would hope this is a very easy fix rather than one that would be declined. –  MετάEd Feb 20 '13 at 21:23
    
@Arjan Sure. On any of the programming sites, a variable name with underscore separation could be part of an alt-text. But from the links you supplied, I understand that this bug also affects URLs themselves, not just alt-text: surely underscores in URLs should not be misrendered. –  MετάEd Feb 20 '13 at 21:28

1 Answer 1

up vote 2 down vote accepted

The server-side Markdown version had two methods for creating image HTML, and only one of them handled this correctly. This version would have worked:

![“Are you coming to bed? —I can’t. This is important. —What? —Someone
is _wrong_ on the Internet.”][1]

[1]: http://i.stack.imgur.com/nXAfo.png

The JavaScript implementation already handled both versions correctly, since it already combined the handling of both versions into one single method that did the right thing.

From the next build on, the server-side implementation does the same.

share|improve this answer

You must log in to answer this question.

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