简体   繁体   中英

W3C Markup Validation - Illegal character in path segment: not a URL code point

I have a problem with the following string:

<a href="../Uses In Industry/planes.html">

And it gives the following error:

Bad value ../Uses In Industry/planes.html for attribute href on element a : Illegal character in path segment: not a URL code point.

I have the same issue with a few more lines, and I can't see what the problem is.

As @CBroe mentioned in the comments, spaces are illegal characters in a URL and must be "escaped". The way to do this is encode them as %20 or, better yet, eliminate them all together by using hyphens or no space at all.

More information can be found in this SO question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM