Page MenuHomePhabricator

Pipe trick parsing fails for wikilinks with both a prefix and anchor
Closed, ResolvedPublic

Description

Author: etdp01

Description:
"Pipe trick" parsing of wikilinks (terminating a wikilink with a pipe and no argument to invoke some default behavior) fails when a wikilink contains both a colon-separated prefix (either a namespace or interwiki prefix, it doesn't matter) and an anchor; e.g. something like [[Foo:Bar#Quux|]] simply dumps that exact text into the viewed page instead of making any sort of wikilink. By contrast, mixing comma parsing with other syntax the pipe trick recognizes does work - e.g. [[Foo, Bar#Quux|]] is equivalent to [[Foo, Bar#Quux|Foo]].

The fix is to generate a wikilink instead. There is some previous discussion at the English Wikipedia's Village Pump (http://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&diff=prev&oldid=223151295) as to what the generated syntax should be, which supports parsing [[Foo:Bar#Quux]] as [[Foo:Bar#Quux|Quux]]; alternately, the "trim everything you can" approach would render it as [[Foo:Bar#Quux|Bar]], which is consistent with the comma example above.


Version: unspecified
Severity: minor

Details

Reference
bz14734

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:09 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz14734.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 645 ***

Wrong dupe, sorry.

  • This bug has been marked as a duplicate of bug 845 ***