I have been working on a mini AJAX and ColdFusion powered Chat application so that I can help people debug their code in a real-time way. One bug that has popped up early on is that "+" symbols are getting lost. From what I narrowed down, the "+" is not even making it into the database. The error is on the way In, not the way Out.
Here is a demo. I created a simple page that took one URL parameter with a "+" symbol and then I dump out the URL structure. Here is the URL:
Here is the URL struct:
// Escape the URL parameters for this AJAX url request. escape( objParams[ strKey ] // Escape the "+" manually. ).replace( new RegExp( "\\+", "g" ), "%2B" )
Want to use code from this post? Check out the license.