I am working on a post type form. The site is wordpress based. While testing the form, I noticed that everytime I use the ”’ character, when the post is posted, it prints out “‘” instead.
For example:
Input: “Bob’s birthday plans.”
Output: “Bob’s birthday plans.”
How do I stop php or wordpress, whichever is responisble, from doing this?
Those are Magic Quotes, one of the most controversial features of PHP.
It is an option in PHP.ini, you should contact your hosting service and have them shut it off (Or look for the option yourself, if you are privileged enough to).
There seems to be a problem with magicquotes and according to this site, the fix consists in adding the following lines to your theme file:
Which would translate to something like, if magic quotes are enabled, remove the slashes from those variable arrays. Therefore fixing your issue.
Could be magic_quotes_gpc or even worse magic_quotes_runtime.