title: Plus Signs converted to spaces in Google Apps Script + MySQL
body: <p>I was using Google Apps as a REST API for a web application, but discovered that the API would not preserve plus signs whenever I attempted to insert a new record. Because of the same origin policy on browsers, the JSON had to be passed on to the API as a parameter on the URL. The process first strigifyied the JSON and then escaped the value using the escape function in JavaScript.</p>
  
  <p>However, once the request reaches Google Apps, the Google process that parses the request object before reaching doGet() treats the unescaped "+" as a space.</p>
  
  <p>This is a really maddening kind of bug to identify, so if anybody else comes across it, I hope my experience fixing it helps. Just use encodeURIComponent() instead of escape() and that should do the trick.</p>