It is safer to always encode the percentages of all characters except those defined as “unconditionally” in RFC-3986.
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
So, percentages encode the plus sign and other special characters.
The problem you are experiencing with the pluses is that in accordance with RFC-1866 (HTML 2.0 specification), clause 8.2.1. subparagraph 1. "The names and values of the form fields are reset: the space characters are replaced with" + ", and then the reserved characters are escaped"). This method of encoding form data is also provided in later HTML specifications; look for the relevant paragraphs about the application / x-www-form-urlencoded.
Maxim Masiutin Oct 27 '16 at 19:17 2016-10-27 19:17
source share