I am using jQuery to serialize a form and then POST it via ajax to the back-end to be saved to MySQL.
I've run into a problem where, for text fields containing quotation marks " and ', jQuery's .serialize() adds an escaping slash, which gets POSTed.
For Example: ' Monitor Size: 22" ' is being saved as ' Monitor Size: 22\" '. These slashes also accumulate as the field is further edited and re-saved, so that it eventually might look like 'Monitor Size: 22\\\\\\" '.
I could remove all back-slashes when processing the $_POST in PHP, but that would also remove any back-slashes that the user might have legitimately entered.
Is there another way to avoid this somehow?
Ideas Much Appreciated!