Last modified: 2011-04-30 01:21:38 UTC
When using the link parameter of the [[Image: |link=]] markup to link to an external URL the parameter $wgExternalLinkTarget is ignored. This has occurred where a small icon image and a site title are both linked to an external site and where $wgExternalLinkTarget = '_blank' is set. Clicking on the image opens the external site in the same browser window while clicking on the textual title brings the external site up in a new browser window.
Created attachment 7177 [details] includes/media/MediaTransformOutput.php The link pass by addExternalLink() in ParserOutput.php (see makeImage() in Parser.php in « case 'link': ») but doesn't pass by makeExternalLink() in Linker.php. To make these links to have a normal behavior, a provisional solution is on my patch (also fixing the usage of $wgNoFollowLinks, but $wgNoFollowDomainExceptions are ignored and maybe $wgNoFollowNsExceptions too). There is a hook must be applied but this hook is called in makeExternalLink(). See the introduction of "link" : http://www.mediawiki.org/wiki/Special:Code/MediaWiki/41333
(In reply to comment #1) Correct diff is http://www.mediawiki.org/wiki/Special:Code/MediaWiki/41727 (but the first one is pertinent too). Sorry
Fixed in r76385.