John Ky wrote:
I like the proposal to make internal and external
links use the same
markup because it is more consistent, but I worry about the treatment
of the ? character:
In the current syntax, it appears that the internal [[]] syntax encodes the
? character so that wiki pages can have the ? character in its name. While
the external [] syntax does not encode the ? character so that pages
that have the ? character in the URI still work (eg. cgi pages).
So in the new syntax, is the ? encoded or not?
URLs are 'pre-formatted'. Any special characters in them are already
escaped as hex codes by the provider of the URL before we see it. A '?'
character in a URL has a particular meaning: it separates the path
portion from the query-string portion. The URL is maintained exactly,
and the '?' continues to be a '?'. It is not changed, because the URL is
already a URL.
Wiki links are not pre-formatted; they give a page title, which is
validated, parsed, and converted to a URL for a page on some particular
known wiki site. Special URL characters in a title, and UTF-8 bytes of
non-ASCII characters in a title, are escaped internally in the wiki when
a URL for that page title is created. A '?' in a wiki page title has no
special meaning, it is just another character in the title. When a URL
is created for the page, the '?' in the title is encoded as %3F.
In URLs '?' means one thing, in wiki page titles '?' means something
else. That would of course not change just because two there are
brackets instead of one on some URL links.
-- brion vibber (brion @
pobox.com)