Imagine this:
- Form data contains an apostrophe
- Form gets submitted
- POST data gets serialized
- POST data is written to database
- Database data is retrieved
- Data cannot be unserialized
The problem is found in the serialized data. I tried without and with an apostrophe:
- s:7:"company";s:12:"Joes company"
- s:7:"company";s:14:"Joe's company"
I know POST data adds slashes to quotes and apostrophes but somewhere my slashes are being removed which is breaking the serialization. I'm not using the stripslashes() function anywhere - any ideas?