@matthijs, thanks for the detective work.
I was experiencing the same issue, but phpinfo(); was saying magic_quotes_runtime and magic_quotes_sybase were both off. Then I decided to do a sitewide search for magic_quotes_* and sure enough, for some reason wp-config.php had this line:
ini_set('magic_quotes_sybase', 1);
Set it to 0 and problem solved. I guess you could also remove the line altogether.
Hope this is useful!