Re: url validation

On Sat, 6 Jul 2002, Gregor Wolbring wrote:

> it's not that simple unfortunately. Every url of an external link like
> an newspaper article shows up with a different error message. But even
> if I know how to correct it. I tried it with the one who has the '&' if
> I change it my browser does not recognize the url anymore.

Then you've made a mistake, or perhaps you tested it incorrectly.

When writing anything in HTML, "&" needs to be replaced with "&".  The
browser interprets "&" to mean a literal "&".

You're not changing the URL when you replace "&" with "&".  You're
just writing it according to HTML's syntax rules.  If you were typing the
URL in your browser's location bar, you wouldn't use "&".

> e.g. the Information society, eEurope 2002: accessibility of public web
> sites and their content for disabled people NEW
> has the url
> http://wwwdb.europarl.eu.int/oeil/oeil_ViewDNL.ProcedureView?lang=2&procid=5959
[...]
> And if I change anything like add amp; ... you can't open the page
> anymore

This works fine for me:

<a
href="http://wwwdb.europarl.eu.int/oeil/oeil_ViewDNL.ProcedureView?lang=2&amp;procid=5959">test</a>

An HTML browser knows that the link is to
<http://wwwdb.europarl.eu.int/oeil/oeil_ViewDNL.ProcedureView?lang=2&procid=5959>.

-- 
Liam Quinn

Received on Saturday, 6 July 2002 19:56:22 UTC