Trying to pass spaces along with ajax call.
\'word\' is been passed the same as \'word \' i believe so.
On the other hand two words need to be send completel
The simplest way, I think, is to encodeURIComponent string in javascript before sending xmlhttprequest, and then urldecode it in PHP