In README.mediawiki files image links point to image URL, not specified URL #157

Closed
haku opened this Issue Sep 15, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@haku

haku commented Sep 15, 2012

If an image is embedded with a link like:

[[Image:https://secure.travis-ci.org/haku/Lookfar.png|link=http://travis-ci.org/haku/Lookfar]]

Then it will be rendered with a link to the image file, not the specified link.

I had to work around this using:

[http://travis-ci.org/haku/Lookfar [[Image:https://secure.travis-ci.org/haku/Lookfar.png]]]

To get the expected behaviour.

@kivikakk

This comment has been minimized.

Show comment
Hide comment
@kivikakk

kivikakk Mar 15, 2017

Member

It looks like wikicloth, our MediaWiki renderer dependency, just doesn't render images:

>> WikiCloth::Parser.new(data: "[[File:Hi.png|thumb]]").to_html                     => "\n<p><a href=\"file:Hi.png\">thumb</a></p>"
>> WikiCloth::Parser.new(data: "[[Image:Hi.png|thumb]]").to_html
=> "\n<p><a href=\"image:Hi.png\">thumb</a></p>"
>> WikiCloth::Parser.new(data: "[http://travis-ci.org/haku/Lookfar [[Image:https://secure.travis-ci.org/haku/Lookfar.png]]]").to_html
=> "\n<p><a href=\"http://travis-ci.org/haku/Lookfar\" target=\"_blank\"><a href=\"image:https://secure.travis-ci.org/haku/Lookfar.png\">Image:https://secure.travis-ci.org/haku/Lookfar.png</a></a></p>"
>>

I'm sure it did once, which probably means a version bump broke it. I'll investigate it and report back here.

Member

kivikakk commented Mar 15, 2017

It looks like wikicloth, our MediaWiki renderer dependency, just doesn't render images:

>> WikiCloth::Parser.new(data: "[[File:Hi.png|thumb]]").to_html                     => "\n<p><a href=\"file:Hi.png\">thumb</a></p>"
>> WikiCloth::Parser.new(data: "[[Image:Hi.png|thumb]]").to_html
=> "\n<p><a href=\"image:Hi.png\">thumb</a></p>"
>> WikiCloth::Parser.new(data: "[http://travis-ci.org/haku/Lookfar [[Image:https://secure.travis-ci.org/haku/Lookfar.png]]]").to_html
=> "\n<p><a href=\"http://travis-ci.org/haku/Lookfar\" target=\"_blank\"><a href=\"image:https://secure.travis-ci.org/haku/Lookfar.png\">Image:https://secure.travis-ci.org/haku/Lookfar.png</a></a></p>"
>>

I'm sure it did once, which probably means a version bump broke it. I'll investigate it and report back here.

@kivikakk

This comment has been minimized.

Show comment
Hide comment
@kivikakk

kivikakk Mar 15, 2017

Member

This is now (finally) fixed! 🎉

Member

kivikakk commented Mar 15, 2017

This is now (finally) fixed! 🎉

@kivikakk kivikakk closed this Mar 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment