Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

When you declare an image the usual way it works:

![alt text][1]

alt text

With links as alt text it works as well:



But when you use a - before a link:

![- http://x][1]

It does not render the image and generates an invalid HTML text output instead (with final rendering different than preview (thanks @animuson)):

  • When in preview the rendered text is http://x" title="" />.
  • In the final post, the rendered text is http://x">. See it below:


Anything else works: ![- http://][1], ![- bla][1], ![- http:/x][1].

share|improve this question
That difference is just because when you don't enter a title, one Markdown engine creates empty title attributes, while the other one creates none at all. – balpha Jun 11 '13 at 6:31

This is most likely the auto-linkifier acting up again. A [ character is not a valid preceder for auto-linkification. A space character, however, is. Apparently a ] is also a valid end character that stops a hyperlink (or perhaps it's seeing the end of the string depending on what order things get processed), so your ![- http://x][1] ends up looking like this after it runs through Markdown:

<img src="<a href="http://x">http://x</a>" title="" />

Once that runs through the sanitizer to remove invalid HTML:

<img src="<a href="http://x">http://x</a>" title="" />

and that's how you end up with the odd result in the rendering.

Note: Oddly enough, the title attribute only seems to get added in the post preview as you're typing, but doesn't get added in the final rendering of the post. shrugs

share|improve this answer
+1: Good catch on pointing out the difference in preview and final rendered text! I didnt notice it! – acdcjunior Jun 11 '13 at 5:16

You must log in to answer this question.

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