We have seen a few instances where double quotes or apostrophes have shown up in blog posts and sometimes in the actual WordPress code. If you are using the built-in WordPress editor, whether you are coding or simply posting a blog, singe quotes get repeated when you save your work. For example: it’s = it”s, or in the code we have seen: $_SERVER['''something'''].
This obviously causes some problems, but have no fear, the solution is quite simple. The multiple quotes issue is caused by magic_quotes, and can be found in the php.ini file, or if you are in a shared environment, the .htaccess file. These variables need to be turned off.
php.ini settings should look like:
—
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ‘ with ” instead of \’).
magic_quotes_sybase = Off
—
Or if you are using an .htaccess file, your settings should look something like this:
—
# BEGIN WordPress
RewriteEngine On
php_value magic_quotes_gpc 0
php_flag magic_quotes_runtime 0
# END WordPress
—
That is it! The problem isn’t a bug in WordPress but rather a result of having magic_quotes turned on.

Thank you! I have been staring at this issue all day and couldn’t figure it out. I threw this code into my .htaccess file and voila, it works.
I don’t know If I said it already but …This blog rocks! I gotta say, that I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks,
A definite great read..Tony Brown