Last modified: 2010-05-15 14:36:13 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 2 - [[page|http://url/]] should link to page, not http://url/
[[page|http://url/]] should link to page, not http://url/
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on: 10752
  Show dependency treegraph
Reported: 2004-08-10 08:51 UTC by Antoine "hashar" Musso (WMF)
Modified: 2010-05-15 14:36 UTC (History)
1 user (show)

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


Description Antoine "hashar" Musso (WMF) 2004-08-10 08:51:25 UTC
Migrated from bugtracker
Originally opened 2002-07-18 08:48

 When a URL contains another full and unescaped URL
within its query string, it is correctly parsed as a
single big URL when placed directly into the text.

However, if put in brackets as [URL] or [URL
description], the URL-in-a-bracket parsing breaks. The
brackets, URL, and description appear as plain text,
and the sub-URL gets reparsed as a standalone hyperlink.

appears correctly as a big link to the correct, full URL.

should display as "[1]" being a link, but instead
appears with brackets and full URL intact as text, but
the portion "" is
a linked URL.

Workaround: Replacing the : with %3A fixes the parsing
problem. (Of course, in this particular case only the
shorter URL is actually needed, as it will be
dynamically redirected to the longer URL.)
Comment 1 Antoine "hashar" Musso (WMF) 2004-08-10 08:51:46 UTC
Date: 2002-07-19 21:06
Sender: lcrocker
Logged In: YES 

I'm lowering the priority on this since there's an easy 
workaround, and would require messing with some pretty 
stable and pretty important code, but it would be nice,
so I'll leave it open.
Comment 2 Antoine "hashar" Musso (WMF) 2004-08-10 08:52:06 UTC
Date: 2002-07-30 20:44
Sender: vibberAccepting Donations
Logged In: YES 

I'm raising the priority because I've come across a case the
workaround doesn't work for.

(See )

If the main URL is http and the sub-URL is *ftp*, the %3A
fix doesn't work: all ftp URLs are parsed /after/ all http
URLs, and somehow the %3A gets transformed back into a : in
the 'title' field of the link... this triggers the ftp
URL-checker, so:

Gutenberg text]

is parsed into the horrific:


Simple partial fix would be to *not* unescape URL-encoded
bytes when producing the 'title' attribute for the link, so
it remains %3A and doesn't trigger the link converter.
Alternatively, find a way to not check for URLs inside HTML
Comment 3 Antoine "hashar" Musso (WMF) 2004-08-10 08:52:16 UTC
Date: 2003-01-23 00:02
Sender: nichtich
Logged In: YES 

URLs inside all kind of links should be treated as text.

For instance:


produces a link to and not to 
[[Sandbox]] !
Comment 4 Antoine "hashar" Musso (WMF) 2004-08-10 08:52:40 UTC
Date: 2003-03-17 07:44
Sender: nobody
Logged In: NO 

Wiki has other problems dealing with URLs that have certain characters
in it like '*' or if the URL contains part of another URL.
[ some link]

As the original bug report indicated, URL escaping can be used
as a
[ some link]

--Sheldon Rampton (
Comment 5 Antoine "hashar" Musso (WMF) 2004-08-10 08:53:14 UTC
Date: 2004-08-07 20:30
Sender: timstarlingAccepting Donations
Logged In: YES 

All of these problems are now fixed except nichtich's. I also 
added URL-encoding, it seemed to me to be more user-
friendly to allow users to paste URLs in directly. Brion's 

Gutenberg text]

This needs to become:

3A// Gutenberg text]

This is not backwards-compatible so may require automated 
Comment 6 Timwi 2004-08-10 17:25:00 UTC
Updating the summary accordingly.
Comment 7 Wil Mahan 2004-09-25 03:21:46 UTC
Fixed in HEAD; I hope the change didn't introduce any new problems.
Comment 8 nasvinyachit 2007-04-19 15:53:54 UTC
Created attachment 3470
Comment 9 nasvinyachit 2007-04-19 15:54:22 UTC
Created attachment 3471
Comment 10 nasvinyachit 2007-04-19 15:54:53 UTC
Created attachment 3472
Comment 11 nasvinyachit 2007-04-19 15:55:14 UTC
Created attachment 3473

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