Dang addslashes() And GPC Magic Quotes

Somewhere in the WordPress code extra slashes are being added to my query terms.

I’ve turned GPC magic quotes off via a php_value magic_quotes_gpc 0 directive in the .htaccess file (we have far too much legacy code that nobody wants to touch to turn it off site-wide). And I know my code is doing one run of addslashes(), but where are the other two sets of slashes coming from?