Ajax POST method converts my "+" value in a string to " " why?

ajax, javascript

Solution

Use the `encodeURIComponent()` function to turn your data in valid encoded data for the request:

xhr.open("POST", url, true);
xhr.send(encodeURIComponent(postdata));

Problem

I cant figure out why in ajax post "+" sign converts to " ".please explain ?

Original source