W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

Re: question on fix-uri config option

From: Fred <fred@gloryofgod.com>
Date: Wed, 9 Oct 2002 14:47:19 -0700 (PDT)
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Amit Narayanan <amit_narayanan@yahoo.com>, <html-tidy@w3.org>
Message-ID: <Pine.LNX.4.44.0210091443540.12482-100000@drizzle.com>

Ah, but you missed something.

It is technically  correct to use
http://www.something.org?onething=1&amp;anotherthing=2&amp;everything=1+2.

And incorrect to use onething=1&anotherthing=2
While leaving the amp; off works. That is because the browsers realize 
that everyone leaves it off and make it work.

And when using xml you have to use &amp; to keep the parsers from 
complaining.  


On Wed, 9 Oct 2002, Bjoern Hoehrmann wrote:

> 
> * Amit Narayanan wrote:
> >I've a quick question on the fix-uri option of Tidy.
> >It is my understanding that the fix-uri option is
> >"yes" by default.  (Although I've set this option to
> >"yes" in my config file)
> >
> >However, any html with an unescaped link, when passed
> >through tidy with the above config, doesn't result in
> >an escaped link in the final html.  For eg. the link
> >I'm trying to escape using tidy is:
> >
> >  http://www.something.org?onething=1&anotherthing=2&everything=1+2.
> >
> >The link arrives in the output html with the '&'
> >character alone encoded with the html "&amp;" .. and not
> >its equivalent escaped url character "%26".
> 
> The ampersand character is allowed in URI References and often has a
> special meaning, it's usually beeing used as separator between
> parameters in the query part of a URI. If it's encoded using the %hh
> encoding it loses this special meaning, i.e. your link is normally
> interpreted as having three parameters
> 
>   onething     = 1
>   anotherthing = 2
>   everything   = 1+2
> 
> if you change it to
> 
>  http://www.something.org?onething=1%26anotherthing=2%26everything=1+2
> 
> it will be interpreted as having a single parameter
> 
>   onething     = 1&anotherthing=2&everything=1+2
> 
> If Tidy converted & to %26 most links will break, that's not the
> intention of that option.
> 
Received on Wednesday, 9 October 2002 17:50:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 23:39:48 UTC