Categories
WordPress

WordPress adding slashes in POST requests

WordPress adds slashes before quotes even if we do not want to use magic quotes.

To solve this problem, you can use either of the following two functions on the values returned from POST requests-

  • wp_unslash
  • stripslashes_deep

References:

By Abhineet Mittal

Abhineet is IIM Alumnus and Founder of popular Digital Publishing Platform, Sahityapedia. He is a technology enthusiast by hobby & an avid reader.