OSAS / strapping-mediawiki

base skin for MediaWiki, based on Bootstrap — layer your own style (fonts, graphics, color) on top
Other
146 stars 35 forks source link

Problem with button #36

Open ddante1 opened 11 years ago

ddante1 commented 11 years ago

I try to use this code in new article wiki:

<a  href="http://simlab.dyndns.org:9000/AllegroHandWiki/index.php/Allegro_Hand_Overview" class=" btn btn-success" >Learn more</a>

But firefox is not correct to interpret:

<p>&lt;a  href="<a href="http://simlab.dyndns.org:9000/AllegroHandWiki/index.php/Allegro_Hand_Overview" class="external free" rel="nofollow">http://simlab.dyndns.org:9000/AllegroHandWiki/index.php/Allegro_Hand_Overview</a>" class=" btn btn-success" &gt;Learn more&lt;/a&gt;
</p>

Is this a bug or I'm doing something wrong?

waldyrious commented 11 years ago

This is not a bug in the strapping-mediawiki skin, it's how mediawiki works: some html tags are restricted for security reasons (see the relevant FAQ entry). In this case, an external link is meant to be inserted with the wikitext markup [http://example.com Link Title]. If you want to style it differently, you can add a <span> tag around it to host the class attribute.

That said, I'd suggest this issue to be closed as invalid.

garrett commented 11 years ago

The problem with wrapping a button with a span is that there's an area that doesn't activate. I should probably look into adding a tiny bit of JavaScript (jQuery really) that passes the clink to any anchors inside the button so it works as expected.

I was going to do this for oVirt.org, where we are using the span technique) but it slipped my mind, as it was before we had a bugtracker set up.

I'll leave this bug open and look back into this at the beginning of next week.