Forum Moderators: open

Message Too Old, No Replies

url validation problem with xhtml

complex url is causing validation problems

         

MWpro

4:28 am on May 20, 2003 (gmt 0)

10+ Year Member



Here is line 34 of my code:

<a href="http://whatever.store.com/store/Cart.po?function=add&quantity1=1&item1=itemname&merchant_id=12345" target="_blank"><img src="img/buyitem.gif" alt="" /></a>

Using xhtml trans., here is the results of my validation. But if I take that complex url out it validates fine. The url adds an item to the shopping cart on a different site that handles the sales for that specific product. Any ideas how I can get this error to go away?


Line 34, column 64: cannot generate system identifier for general entity "quantity1"
Line 34, column 73: reference not terminated by REFC delimiter
Line 34, column 73: reference to external entity in attribute value
Line 34, column 76: cannot generate system identifier for general entity "item1"
Line 34, column 81: reference not terminated by REFC delimiter
Line 34, column 81: reference to external entity in attribute value
Line 34, column 96: cannot generate system identifier for general entity "merchant_id"
Line 34, column 107: reference not terminated by REFC delimiter
Line 34, column 107: reference to external entity in attribute value

lowlander

6:27 am on May 20, 2003 (gmt 0)

10+ Year Member



The errors are due to the "&" not being "&amp;". I don't know wether this is necessary or just an error in the validator.
BTW target="_blank" is not valid in xhtml.

papabaer

6:54 am on May 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Target_blank IS allowed in XHTML 1.0 Transitional... and the problem is from the unescaped ampesands. Use &amp; The Validator is functioning fine, the clue can be found in this example: entity "quantity1" <------> &quantity1 is being read as an unknown character entity. Easy fix...

lowlander

11:00 am on May 20, 2003 (gmt 0)

10+ Year Member



papabaer, which is "better" %26 or &amp;?

papabaer

3:35 pm on May 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've always used &amp; and have never had any problems.

MWpro

7:20 pm on May 20, 2003 (gmt 0)

10+ Year Member



Changing the & to &amp; fixed it, thank you all for your solutions and suggestions.