I have a PHP script that does basic encryption of a string through the method below:
We ran into the same problem trying to pass a URL to a PHP script with a string variable containing the "+" symbol. We were able to make it work with;
encodeURIComponent([string])
EG:
var modelString = "SEACAT+PROFILER";
modelString = encodeURIComponent(modelString);
//"SEACAT%2BPROFILER"
The %2B
passes the correct value to the PHP GET as @hobodave said, and we get back the right data set.
Hope this helps someone else who ran into something like this, and needed a slightly different take on the examples above.