Last modified: 2011-03-13 18:05:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4119 - bad displaying of a link followed by <nowiki> (seems related to linktrail)
bad displaying of a link followed by <nowiki> (seems related to linktrail)
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Lowest normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2005-11-30 18:35 UTC by Pablo Saratxaga
Modified: 2011-03-13 18:05 UTC (History)
1 user (show)

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


Description Pablo Saratxaga 2005-11-30 18:35:24 UTC
In the wa: wikipedia I changed the linktrail to also
include uppercase A-Z, so that the trail can have upercase too, eg it is:

'linktrail' => '/^([a-zåâêîôûçéèA-ZÅÂÊÎÔÛÇÉÈ]+)(.*)$/sD',

since then, I saw a very strange behaviour,
try the following wikicode on a page in the wa:
wikipedia (just "preview" will do):


as you can see on the lines without the nowiki part
the trail is properly included in the clickable link,
both lower and upercase, and accented letters as well.
However, the lines with nowiki render very strangely,
instead of "aabb" with "aa" clickable and "bb" not,
it renders as 
"aaNaodW29-nowiki49a5b674f36af500000001" with
"aaNaodW" clickable and the rest not.
note that if I put a character not in the linktrail between the "]" and the "<"
then it displays fine (but if the character is in Latin extension set A it
displays wrongly, actually it dispalys as 2 U+FFFD, one linked to the clickable
string, and one not...), see:

*[[aa]]x<nowiki>bb</nowiki> (ascii char, displays ok)
*[[aa]]ə<nowiki>bb</nowiki> (above U+00FF, displays ok)
*[[aa]]ö<nowiki>BB</nowiki> (between U+007F and U+00FF, displays wrong for that

the problem with letters in U+007F-U+00FF don't
depend on the nowiki, so maybe there are two problems, see:


Now, go to fr: wikipedia and test the same set of wikicode samples; the
rendering is ok, but trail with uppercase unaccented letters is ignored (trail
with uppercase accented letters is recognized); the linktrail in fr: is the


the main difference with the wa: linktrail version
is that I added tha "A-Z" as it doesn't make sense
to have upercase accented chars but not the unaccented letters (I also removed
several accented
letters unused in walloon and added "åÅ"):


could the "A-Z" be the reason of the rendering problem?
but I don't understand how it can be.

there is clearly a parsing problem just after the closing "]" when a nowiki or a
char in latin1 set
is involved
Comment 1 Antoine "hashar" Musso (WMF) 2005-11-30 19:06:06 UTC
[[Foobar]]<pre>toto</pre> trigger the error too.

The linktrail match 'NaodW', that disabled our parsing system :p

One way is to change the NaodW thing or make it so the linktrail
regex doesnt match "NaodW29".
Comment 2 lɛʁi לערי ריינהארט 2006-03-08 19:59:51 UTC

It seams that the (this?) error is triggered (also?) by the *first* character in

[[Glavna stranica]]{{Predložak:diacritics/hr}}
at [[wikt:hr:user:Gangleri/tests/bugzilla/04119/001]]
[[Glavna stranica]]{{SUBST:Predložak:diacritics/hr}}
[[Glavna stranica]]ČčĆćDždžĐ𩹮ž
at [[wikt:hr:user:Gangleri/tests/bugzilla/04119/001]]

Glavna stranica��čĆćDždžĐ𩹮ž
"Glavna stranica�" is blue and "�čĆćDždžĐ𩹮ž" is black.

The links is OK: [[wikt:hr:Glavna stranica]].

best regards reinhardt [[user:gangleri]]
Comment 3 Brion Vibber 2006-03-17 00:06:38 UTC
The unicode bits are due to the regex being bogus (missing the /u option, so it's 
byte-oriented), which has since been fixed.

As for the nowiki bit; for now I'm just removing the capitals since they're not 
allowed in linktrail anywhere else.

I'm resolving this as LATER, in case someone wants to try harder to "fix" this 
properly, but it won't be an issue as long as capitals stay out of the linktrail as 

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