url encoding, Form encoding and mailto: encoding

后端 未结 1 1596
面向向阳花
面向向阳花 2021-01-22 09:06

I am a little bit confused about the whole encoding issues related to HTML. I am not refering to the charset in the headers or encoding in the XML prologue. That I get. Lets me

相关标签:
1条回答
  • 2021-01-22 09:53

    URIs (like your mailto example) should be encoded according to RFC 3986, which specifies that spaces are to be encoded as %20.

    The format of FORM data, on the other hand, is encoded as application/x-www-form-urlencoded according to the rules defined by the HTML specification. (See, for example, section 17.13.3.3 of the HTML 4.01 specification.) This specifies that spaces are to be translated as + signs.

    Thus, while percent encoding is similar between URIs and form data, the space character is treated differently.

    0 讨论(0)
提交回复
热议问题