[pmwiki-users] url parms with ampersands and w3c validation
Chris Cox
ccox at airmail.net
Wed Oct 19 08:35:19 CDT 2005
Patrick R. Michaud wrote:
> On Wed, Oct 19, 2005 at 01:28:09AM -0500, Chris Cox wrote:
>>According to w3c, you can't have raw apersands in URLs.
>
> One cannot have raw ampersands in an *HTML document*, because the
> ampersand is used to denote character entities. Thus within an
> HTML document, one has to use "&" instead of "&", even in
> things like src="..." and href="...". HTML authors often forget
> about this when creating HTML.
>
> It's perfectly valid to have raw ampersands in urls; in fact, the
> CGI specification explicitly says to use "&" to separate parameters.
>
>>So I figured something like
>>
>>[[whatever?blah=1&foo=2]]
>>
>>would work. But the & becomes a regular ampersand inside
>>of the link in html and fails validation.
>
> In markup, this should be
>
> [[whatever?blah=1&foo=2]]
>
> i.e., the actual url as it would appear in the address bar of a browser.
> PmWiki already takes care of converting ampersands to "&" as
> needed in the HTML output.
>
I noticed that PmCalendar pages won't pass the w3c validator
though ... and it seems to indicate that it's a problem with
ampersands in the urls.
Curious.
More information about the pmwiki-users
mailing list