Last modified: 2014-04-17 05:46:28 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 T2468, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 468 - Preceding text and single apostrophes are not included in links
Preceding text and single apostrophes are not included in links
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Lowest enhancement with 5 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: newparser, parser
: 5245 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 2004-09-12 22:39 UTC by Leah
Modified: 2014-04-17 05:46 UTC (History)
11 users (show)

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


Description Leah 2004-09-12 22:39:59 UTC
Text appearing before, or single apostrophes followed by text and appearing
after double-bracket links are not included in the rendered anchor.  That is:

[[abc]]de becomes <u>abcde</u>
'[[abc]]'   =>    '<u>abc</u>'
abc[[de]]   =>    abc<u>de</u> rather than <u>abcde</u>
[[abc]]'s   =>    <u>abc</u>'s rather than <u>abc's</u>
Comment 1 JeLuF 2004-09-12 22:47:59 UTC
Prefixes are only added to the link for certain languages, e.g. Arabic.
Language::linkPrefixExtension must be set to "return true;" for this.

Ticks like ' and " are not supposed to become part of the link. Works as designed.
Comment 2 Leah 2004-09-12 23:22:03 UTC
That's peculiar.  What's special about Arabic?

I've noticed occasionally on the English Wikipedia that links are sometimes
written [[Canada|Canada's]] when they ought be more simply written as
[[Canada]]'s.  This would be trivial to implement.

Most bugs "work as designed".  Often the design is wrong.
Comment 3 JeLuF 2004-09-13 06:06:38 UTC
Arabic merges article and noun. So they have lots of things like "the[[window]]"
Comment 4 Rowan Collins [IMSoP] 2004-10-15 11:22:36 UTC
As for treating trailing apostrophes as part of the link, that's just a matter
of adding ' to the character class in [[MediaWiki:Linktrail]].

i.e. a LinkTrail of "/^([a-z']+)(.*)$/sD" should allow your "[[Canada]]'s"
example to work as you want it to. I must say, I can't *think* of any situations
where this would be undesirable, unless it created annoying bugs by conflicting
with ''italics'' etc., but I imagine it shouldn't...
Comment 5 River Tarnell 2004-10-15 11:30:48 UTC
FWIW, putting preceeding text in the linktrail would cause problems with e.g.
Welsh, where constructions like "Mae[[Yr Undeb Ewropeaidd|'r Undeb
Ewpropeaidd]]..." are common.  
Comment 6 Melancholie 2006-03-13 23:20:09 UTC
*** Bug 5245 has been marked as a duplicate of this bug. ***
Comment 7 phi1ipp 2007-04-23 19:48:51 UTC
Rowan's suggested fix (of changing the linktrail through the MediaWiki namespace
interface) doesn't actually work, as "the software ignores this page, and takes
the regular expression in the message files, for performance and stability
reasons." src:

Also see for the
same fact.

So can devs include the apostrophe in the expression for English language? I'm
going to assume that this is already a setting included in language packs? Cf.

Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-04-24 00:06:31 UTC
What would this do in the case of ''[[Italicized]]'' or [[Link]]''italicized''
or ''italicized [[link]]'' or similar degenerate cases?
Comment 9 AlefZet 2008-06-14 14:12:09 UTC
Fixed with r36253.
Comment 10 Rich Farmbrough 2009-05-23 20:24:19 UTC
I believe this has been unfixed by

Regardless the behaviour en.wp is as described, and the MediaWiki:Linktrail page, which has included ' since 2007 seems still to be ignored.
Comment 11 Niklas Laxström 2009-05-23 21:51:49 UTC
(In reply to comment #10)
> Regardless the behaviour en.wp is as described, and the MediaWiki:Linktrail
> page, which has included ' since 2007 seems still to be ignored.

And that is not going to change. Actually, the page has not been "in use" in years.
Comment 12 Rich Farmbrough 2009-05-23 22:03:19 UTC
It is not clear from this bug whether the intention was to fix the default, the overriding of Linktrail or both. 
Nonetheless, although I assumed MediaWiki:Linktrail was never made live again, the substantive point is default value of Linktrail is reverted.

Comment 13 Andrew Dunbar 2009-06-07 01:47:46 UTC
Like Arabic, Hebrew also uses prefixes for "the", "to", "from", "that", and "and". These can be used in combination. They don't seem to work in the link trail on the English Wiktionary which of course has many Hebrew links.
Comment 14 Mark A. Hershberger 2011-04-12 15:09:27 UTC
Brion said he would investigate this but it might be something reserved for the new parser.
Comment 15 matanya 2012-07-26 08:47:06 UTC
Brion, Did you investigate this?
Comment 16 Andre Klapper 2013-01-09 13:34:15 UTC
This report has been in ASSIGNED status for more than one year and you are set as its assignee. In case that you are not actively working on a fix, please reset the bug status to NEW/UNCONFIRMED.
In case you do not plan to work on a fix in the near future: Please also edit the "Assigned To" field by clicking "Reset Assignee to default", in order to not prevent potential contributors from working on a fix. Thanks for your help!
Comment 17 Quim Gil 2014-04-17 05:46:28 UTC
The summary of this discussion seems to be: the current design works as intended. The arguments against the current design have been challenged by examples of other languages where the current implementation also makes sense.

On top of this we have almost a decades of wiki editing under these conditions.

I will be bold and I will resolve this report as WORKSFORME.

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