Ryan S
Ryan S

Reputation: 3268

How would you make a valid URL String when it contains &

Take this for example: <a href="manageCart.php?action=remove&id=49">

When validated, you will get this result:

Line 26, Column 802: & did not start a character reference. (& probably should have been escaped as &amp;.)

But this is not content, so the & is necessary. What is done to make it valid html?

Upvotes: 1

Views: 921

Answers (2)

Eonasdan
Eonasdan

Reputation: 7765

validaters usually want &amp; instead of just the & sign. when you click on the link it will still change it to & in the browsers url

Upvotes: 0

Joseph Marikle
Joseph Marikle

Reputation: 78540

<a href="manageCart.php?action=remove&amp;id=49">

Use &amp;

Upvotes: 6

Related Questions