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

Assigned To
demon, wikibugs-l

Author: etdp01

"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

bzimport added a project: MediaWiki-Parser.Via ConduitNov 21 2014, 10:09 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz14734.
bzimport created this task.Via LegacyJul 5 2008, 2:40 PM
demon added a comment.Via ConduitJul 13 2009, 6:40 PM
  • This bug has been marked as a duplicate of bug 645 ***
demon added a comment.Via ConduitJul 13 2009, 6:41 PM

Wrong dupe, sorry.

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.