Support » Plugins » update_options

  • In the plugin I’m writing, I have an admin option that should be able to take a string enclosed in quotation marks. However, the quotation marks are being turned into backslashes. Obviously, it’s some sort of escape character issue, but even if I insert an backslash before the quotation mark, it still gets removed.

    I’m assuming this has something to do with how update_options works. I’ve briefly looked at how the function works, but I was hoping someone might of encountered this before and know how to circumvent it.


Viewing 1 replies (of 1 total)
  • Moderator Mark Jaquith


    WordPress Lead Dev

    GPC is automatically slashed by WP. Use stripslashes() before updating the option, because update_option() will try to add slashes again.

Viewing 1 replies (of 1 total)
  • The topic ‘update_options’ is closed to new replies.