ampersands in URLs

  • Thread starter Thread starter charlie
  • Start date Start date
C

charlie

Hi.

My site links to many news sources & many of the URLs include "&"
ampersands. I've recently added <!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> to
all my pages & am trying to get them to validate.

I'm doing OK but the biggest hurdle is that supposedly the "&" in all
the news urls has to be re-written as "&amp;". This will take the rest
of my life to do unless there is some way around it.

The hyperlinks (as written) work fine and redirect people to the
correct news articles.

What should I do???

Thanks.
 
Remove the DOCTYPE tag?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.

Hi.

My site links to many news sources & many of the URLs include "&"
ampersands. I've recently added ?<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> to
all my pages & am trying to get them to validate.

I'm doing OK but the biggest hurdle is that supposedly the "&" in all
the news urls has to be re-written as "&amp;". This will take the rest
of my life to do unless there is some way around it.

The hyperlinks (as written) work fine and redirect people to the
correct news articles.

What should I do???

Thanks.
 
Hi,
Couldn't you do a search and replace? The other option, unless you really
want to put the valid logo on your site, is to just ignore the error. Your
site works, the links work so you don't really need to pass validation with
flying colours.

In the long term though if you have that many links you may want to consider
some kind of database solution to manage the links - this should make your
job a lot easier.

--
Cheers,
Jon
Microsoft MVP

Hi.

My site links to many news sources & many of the URLs include "&"
ampersands. I've recently added ?<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> to
all my pages & am trying to get them to validate.

I'm doing OK but the biggest hurdle is that supposedly the "&" in all
the news urls has to be re-written as "&amp;". This will take the rest
of my life to do unless there is some way around it.

The hyperlinks (as written) work fine and redirect people to the
correct news articles.

What should I do???

Thanks.
 
Some URLs may not work if &amp; is used in place of the &, this depends on how the site was coded.
So either keep the DOCTYPE and don't validate the page.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Hi.

My site links to many news sources & many of the URLs include "&"
ampersands. I've recently added ?<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> to
all my pages & am trying to get them to validate.

I'm doing OK but the biggest hurdle is that supposedly the "&" in all
the news urls has to be re-written as "&amp;". This will take the rest
of my life to do unless there is some way around it.

The hyperlinks (as written) work fine and redirect people to the
correct news articles.

What should I do???

Thanks.
 
Thanks for the help! Do any of you use (or think it is smart to use)
one of the "make a shorter link" interfaces for your hyperlinks? Is
there ever a good reason to do that? If so, which websites (ie.
"makeashorterlink.com") are the best ones to use?
 
A good measure of whether something is "smart to use" is, does it fulfill a
requirement of your web site? If not, it's just playing. And playing is bad,
m'kay? The horse pulls the cart.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top