Last modified: 2013-09-19 04:07:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31920, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29920 - CLASS attribute missing in [[File:...|link=...]]
CLASS attribute missing in [[File:...|link=...]]
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.17.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-16 10:58 UTC by ITw3
Modified: 2013-09-19 04:07 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description ITw3 2011-07-16 10:58:39 UTC
When using the '|link=' option within [[File:]] the 'image' class is not applied to the <a> attribute.

This makes it difficult to style the output with CSS.

Please can a class be added to the <a> attribute for images in all cases.

If class 'image' is deemed inappropriate, then perhaps 'imageLink' could be used?

Example with class:
WIKITEXT:
[[File:filename.jpg]]
HTML:
<a href="/wikipath/index.php/File:filename.jpg" class="image">
    <img alt="filename.jpg" src="/wikipath/images/da/da/filename.jpg" ...etc />
</a>

Example without class:
WIKITEXT:
[[File:filename.jpg|link=http://wikimedia.org]]
HTML:
<a href="http://wikimedia.org">
    <img alt="filename.jpg" src="/wikipath/images/da/da/filename.jpg" ...etc />
</a>

Footnote:
Bug 23226 would be useful to have also, but in addition to the default class that should be there per above.
Comment 1 Ruslan 2012-09-13 06:30:30 UTC
Yes, it would be useful if 'image' class were assigned to any anchor with the image inside.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links