I am working with Zend Framework. I have a form with some fields, all of them type="text", including an input called “Telephone”. When submit, I am using Ajax to send data to Controller. Well here is my problem, if I type a + symbol, for example:
+34-666666666 the data I receive is 34-666666666. The + symbol turns into a whitespace. This problem only happens with +, I have tried with all the symbols and theres no problem. I am going mad and I didn’t found any solution in Google.
I am working with Zend Framework. I have a form with some fields, all
Share
You need to encode your GET/POST data as described here. The JavaScript
encodeURIComponentfunction can be used with a little twist*:*Note: treatment of
+character in a URL varies depending on whether it is used inside a path component or query string:http://example.com/page+1— file namepage+1http://example.com/page%201— file namepage 1http://example.com/?file=page+1— query string parameterfile=page 1http://example.com/?file=page%201— query string parameterfile=page 1