Page MenuHomePhabricator

Image captions ending with external links display inconsistently due to interpretation of multiple brackets
Open, LowPublic

Description

Author: wikiGracenotes

Description:

  1. [[Image:Example.png|thumb|150px|center|Text with [http://google.com link]]]

This results in a thumbnail with a caption of Text with link, and "link" links to http://google.com.

  1. [[Image:Example.png|thumb|150px|center|[[Text]] with [http://google.com link]]]

This results in a thumbnail with a caption of Text with [http://google.com link, where "Text" is an internal link
to the page titled "Text", and "http://google.com" is a bare
link to Google's home page. Also, with "]]]", the first two
brackets are parsed as the image's ending delimiters. The last
"]" is rendered as plain text.

The only difference between these two is that the second
example contains an internal link. In the second example, the
caption should be displayed as "Text with link", where "Text"
and "link" are linked appropriately. With "]]]", the last two
brackets should be parsed as the image's ending delimiters.

This bug should be reproducible on any Wikimedia wiki. I've
also tested it on MediaWiki 1.6.10, where the same
behavior is exhibited.


Version: 1.21.x
Severity: normal
Whiteboard: aklapper-fixedbyVE
URL: http://test.wikipedia.org/wiki/Bug_11239

Details

Reference
bz11239

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:53 PM
bzimport set Reference to bz11239.
bzimport added a subscriber: Unknown Object (MLST).

Created a testcase on testwiki.

A possible workaround is just to add a single space before the closing “]]” (after the previous “]”).

  • Bug 20167 has been marked as a duplicate of this bug. ***

gangleri wrote:

in addition to description from duplicate bug

This aplies also for captions inside <gallery> see
[[commons:File talk:Albrecht Dürer - Melencolia I (detail).jpg]]

note: This bug *needs* a parsertest written for it.

Best regards Reinhardt [[user:Gangleri]]

  • Bug 25066 has been marked as a duplicate of this bug. ***

related wrong brackets handling: bug 26996 and bug 25721

matmarex set Security to None.