Dear wgetters,

A few days ago I asked about whether wget should escape semicolons in filenames that 
it downloads.  I didn't get many replies, so I have done some research and have 
concluded that it probably should be escaping them.

There is not much to go on in terms of specifications.  The closest is RFC1738, which 
includes BNF for a file: URI.  However it is ten years old, so whether it reflects 
current practice I do not know.  But it does not allow ; in file: URIs.

I conclude from this that wget should be replacing ; with its %3b escape sequence.

Is anyone able to fix this?


Thanks for these replies:

Dave Nicoson wrote:
> > is ";" an acceptable character in Windows filenames?
> Looks like "yes" with win2k.

Thanks Dave.


Tony Lewis wrote:
> > I use semicolons in CGI URIs to separate parameters.  (Ampersand
> > is more often used for this, but semicolon is also allowed and
> > has the advantage that there is no need to escape it in HTML.)
>
> There is no need to escape ampersands either.

Tony, are you suggesting that this is legal HTML?

  <a href="http://foo.foo/foo.cgi?p1=v1&p2=v2";>Foo</a>

I'm fairly confident that you need to escape the & to make it valid, i.e.

  <a href="http://foo.foo/foo.cgi?p1=v1&amp;p2=v2";>Foo</a>


Regards,

--Phil.

Reply via email to