+ in post? |
[eluser]gRoberts[/eluser]
Hi all, My client has just asked why when he uses an ajax feature i've implemented that it doesn't remember +'s? The content is escaped prior to being sent and using firebug, it is still there when i call open (ajax) but when its received in the controller and parsed using the input->post (with and without xss), it converts the + to a single space. Any idea's on how i can overcome this? Cheers
[eluser]manilodisan[/eluser]
What if you use $_POST instead of $this->input->post?
[eluser]gRoberts[/eluser]
The same my friend. Like in querystrings, + represents a space. As post is passed across like Code: param1=My+name+is¶m2=gavin I think it is treated the same. I can't seem to get it to work, i've tried escaping it, I can't seem to find the ascii equiv either. Thanks Gav
[eluser]manilodisan[/eluser]
Try to base64_encode the data before sending it to PHP and decode there.
[eluser]gRoberts[/eluser]
![]() The only downside is having to do that... Thank you !
[eluser]manilodisan[/eluser]
I don't see any downside rather than having to load another js file. base64 was built for things like this. |
Welcome Guest, Not a member yet? Register Sign In |