Last modified: 2011-04-30 01:21:38 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 T23364, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21364 - "link=" parameter in [[Image: ignores $wgExternalLinkTarget
"link=" parameter in [[Image: ignores $wgExternalLinkTarget
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-31 05:13 UTC by Joe Costello
Modified: 2011-04-30 01:21 UTC (History)
3 users (show)

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


Attachments
includes/media/MediaTransformOutput.php (663 bytes, patch)
2010-03-03 22:30 UTC, Louperivois
Details

Description Joe Costello 2009-10-31 05:13:23 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.
Comment 1 Louperivois 2010-03-03 22:30:58 UTC
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
Comment 2 Louperivois 2010-03-03 22:42:52 UTC
(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
Comment 3 Alexandre Emsenhuber [IAlex] 2010-11-09 12:26:15 UTC
Fixed in r76385.

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


Navigation
Links