I get the bad value for attribute href
on element a
: Illegal character in query: not a URL code point on W3C with the following a
tag:
<a href="/edit_booking.php?requestID=84&moduleID=109&no_rooms=2&parks=Central,East&rooms=1,39&weeks=1,3,5,7,9,11,13,15&day=1&semester=1&start_time=09:00&end_time=10:00&length=1&students=100&type=Lecture&Priority=N&metaID=&comments=Crappy Booking&status=1&round=1&date_submitted=2015-02-16 05:01:17&year=2015/2016&" title="This is a link edit the booking"><i class="fa fa-edit"></i></a>
The link is generated from PHP; now if the commas are not allowed I can do a replace but I'm not sure if they are allowed in this format or not.
Is there something I'm missing, because it looks fine to me?
The spaces in the query string are causing the error. In your sample they appear in two places: comments=Crappy Booking
and date_submitted=2015-02-16 05:01:17
.
URL-encoding the spaces to %20
, as advised by the validator, allows your markup to validate:
<a href="/edit_booking.php? ... &comments=Crappy%20Booking&status=1&round=1&date_submitted=2015-02-16%2005:01:17&year=2015/2016&" title="This is a link edit the booking"><i class="fa fa-edit"></i></a>
Using PHP, rawurlencode
will do the job (percent-encoding) for you.
A space will be encoded to %20
(RFC 3986).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With