This is a follow-up to a question I asked a few weeks back.
The following:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Test</title>
</head>
<body>
<a onclick="start_ajax_request('url.php&key1=val1&key2=val2&key3=val3')">Test</a>
</body>
</html>
will not validate in the W3C validator as HTML 4.01 transitional, wrongly, as far as I can see. It complains about entities and wants each ampersand converted to &
. &
in the given context however, would be wrong, because my Ajax request needs plain ampersands and will break when fed &
.
Is there a way to mask/escape the ampersands in this example so that it's still a valid URL that will pass through the Ajax request, and shuts up the validator?