trunting2
trunting2

Reputation: 21

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.

Upvotes: 1

Views: 10310

Answers (1)

Rob
Rob

Reputation: 15150

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.

Upvotes: 3

Related Questions