0

On our website, we are using JSON in location.hash. That means we need to use quotes in the URL as for instance:

https://goout.net/cs/jine-akce/3-2-1-jedem/qmnub/#"T":"2017-03-15T20:00:00"

The problem is that the W3C validator is not happy about it.

All the browsers handle the URL well, so I wonder if the validator is too strict or my URL is wrongly escaped?

unor
  • 87,575
  • 24
  • 195
  • 335
Vojtěch
  • 10,578
  • 27
  • 90
  • 152

1 Answers1

4

Quotes are not allowed in the fragment part of a URL, so you have to percent-encode it with %22:

https://goout.net/cs/jine-akce/3-2-1-jedem-impro-talk-show-s-cestovatelem-danem-pribanem/qmnub/#%22T%22:%222017-03-15T20:00:00%22

List of valid characters in the URL fragment part: List of valid characters for the fragment identifier in an URL?

Community
  • 1
  • 1
PCO
  • 625
  • 8
  • 11