3

The markdown ![[image][1]][1] renders a broken tag:

[image http://google.com]1

3
  • You're trying to make an image that has URL syntax as a tooltip? If you want to make an image that links, you want the ! inside like [![image][1]][2]. Still doesn't change that there is a broken HTML tag, though...
    – Grace Note StaffMod
    Commented Feb 4, 2011 at 20:09
  • @Grace: I know. I discovered this by accident.
    – SLaks Mod
    Commented Feb 4, 2011 at 20:10
  • Very related: meta.stackexchange.com/a/106811/115866
    – balpha StaffMod
    Commented Jan 12, 2012 at 8:59

3 Answers 3

0

I don't think what you're trying to do makes sense.. even a little.

Have a peek:

http://babelmark.bobtfish.net/?markdown=%21%5B%5Bimage%5D%5B1%5D%5D%5B1%5D%0D%0A%0D%0A%5B1%5D%3A+http%3A%2F%2Fgoogle.com

This is well into WTF? territory.

Instead I suggest something more sane:

![https://i.sstatic.net/z1f8A.png][1]

  [1]: https://i.sstatic.net/z1f8A.png

https://i.sstatic.net/z1f8A.png

3
  • I realize that this is invalid syntax. However, it's also a bug; it shouldn't emit a broken tag.
    – SLaks Mod
    Commented Feb 28, 2011 at 3:48
  • I haven't analysed this for XSS holes yet.
    – SLaks Mod
    Commented Feb 28, 2011 at 3:50
  • @SLaks: There shouldn't be one. You can produce the identical output by just writing image"> yourself instead of using this syntax to produce it.
    – balpha StaffMod
    Commented Feb 28, 2011 at 7:33
3

While I agree with Jeff that this doesn't make much sense to try, it does behave somewhat nicely these days. It picks an absolutely valid interpretation of ![[image][1]][1], namely this:

![              // begin of the image
    [image      // the image's alt text is "[image"
]               // end of the alt text
[1]             // the image url (a reference, so it'll be google.com,
                // which isn't an image and thus looks broken)
]               // a verbatim "]"
[1]             // a shortlink with the link text "1" to the url referenced by [1],
                // which is google.com

It looks like this:

[image http://google.com]1

In particular, there's no broken tag.

0

Confirmed

[image

![[image](http://www.vightel.com/rw_common/themes/blendit/images/header/image4.jpg)](http://www.vightel.com/)

I'm assuming you're trying to wrap an image in a link.

And there is an interesting difference between the preview and actual rendering:

enter image description here

You must log in to answer this question.

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