CodeIgniter Forums

Full Version: CJAX preserve plus sign ( + ) in form inputs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Needle[/eluser]
I've been using the CJAX Framework with CI and things have been working smoothly, with AJAX calls passing as expected. However, I recently noticed that the plus sign "+" is not making it from my form inputs to my PHP handler script. Rather, the plus signs get replaced by spaces, so:

[email protected] -> email [email protected]

I believe this is due to CJAX and the way it handles the url encoding, but I'm stuck trying to pinpoint the exact code within the CJAX core. Web searches indicate that encodeURIComponent may be the missing piece, but I'd like to know if this is expected behavior for CJAX and if there is some way to encode the form fields within CJAX in a way that preserves the plus signs.

El Forum

[eluser]Needle[/eluser]
I found a solution with help from CJAX's author.
See this discussion.