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.
