Home › Forums › General Issues › ACF value with apostrophe not being returned › Reply To: ACF value with apostrophe not being returned
Slashes are added to input to escape values because that is how your server is configured. If you access the raw values of $_POST then you must strip them before using them to query the db.
You are not inserting anything into the DB, you are looking for something that is already there. In addition to this WP sanitizes the values before when using WP_Query. This would only be a concern if you were directly querying the DB instead of using WP_Query. This is what the prepare() method of wpdb is for.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.