HTTP URL - allowed characters in parameter names

后端 未结 4 533
一向
一向 2020-12-11 00:56

Is there any formal restriction as to which characters are allowed in URL parameter names?

I\'ve been reading RFC3986 (\"Uniform Resource Identifier (URI): Generic S

4条回答
  •  余生分开走
    2020-12-11 01:27

    There are reserved characters for URLs, but as long as you escape (urlencode) then you should be fine.

    Depending on the framework used, you may get exceptions if you try to submit suspicious values. ASP.NET has content filtering that will throw exceptions if you try to submit "unsafe" data, like scripts or HTML. That's a feature of the framework though rather than a limitation or rule enforced by the URL syntax.

提交回复
热议问题