URL 中的引号无效

Invalid quotes in URL

在我们的网站上,我们在 location.hash 中使用 JSON。这意味着我们需要在 URL 中使用引号,例如:

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

问题是 the W3C validator is not happy about it.

所有浏览器都很好地处理了URL,所以我想知道是验证器太严格了还是我的URL被错误地转义了?

URL 的片段部分不允许使用引号,因此您必须 percent-encode 使用 %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

URL 片段部分中的有效字符列表:List of valid characters for the fragment identifier in an URL?