1

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.

unor
  • 92,415
  • 26
  • 211
  • 360
trunting2
  • 21
  • 1
  • 1
  • 3
  • 2
    The spaces are. You need to properly URL-encode them. (And if you don’t know what that is/means, please research it.) – CBroe Oct 18 '15 at 14:15
  • 1
    Btw., I don’t know what validation mode/HTML doctype you used – but for HTML5 validation (https://validator.w3.org/nu/), the validator even outputs a message specifically saying how spaces should be encoded. – CBroe Oct 18 '15 at 14:18

1 Answers1

3

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.

Community
  • 1
  • 1
Rob
  • 14,746
  • 28
  • 47
  • 65