Re: question on fix-uri config option

Sorry everyone. My mistake made in my zeal to be able to actually 
contribute something.

I didn't read the original email closely enough and what I was saying 
doesn't apply, and Bjoern hit it on the head.

On Wed, 9 Oct 2002, Fred wrote:
> Ah, but you missed something.
> 
> It is technically  correct to use
> http://www.something.org?onething=1&anotherthing=2&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 & 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 "&" .. 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:58:41 UTC