Page MenuHomePhabricator

Using a post-1.14 image link ([[File:foo|link=bar]]) doesn't add nofollow to external links
Closed, ResolvedPublic

Description

Author: jtwyford+wmbz

Description:
Image links pointing to external sites using the File: syntax, (not the <imagelink> extension) are not adding the rel=nofollow attribute to the anchors.

Example:
[[File:Foo.jpg|alt=Foo|link=http://example.com]]

Produces:
<a href="http://example.com"><img alt="Foo" src="http://path/to/foo.jpg" border="0" height="22" width="22"></a>

Should be:
<a href="http://example.com" rel="nofollow"><img alt="Foo" src="http://path/to/foo.jpg" border="0" height="22" width="22"></a>

Regular external links [http://example.com Foo] work properly and include the nofollow attribute.


Version: 1.15.x
Severity: normal

Details

Reference
bz24437

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:12 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz24437.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 11026
patch for 1.19 branch

attachment nofollow-1.19.1.b.patch ignored as obsolete

Created attachment 11027
Patch for 1.18 branch

attachment nofollow-1.18.patch ignored as obsolete

Created attachment 11100
Fix for 1_19 branch

Better fix for the REL1_19 branch

Attached:

Created attachment 11101
Fix for 1_18 branch

Improved fix for REL1_18 branch

Attached: