Does update_post_meta() use sql prepared statements?
-
I have a custom-post field in which I want to allow user to save html code. (The post defines an upcoming concert, and paypal supplies the pay button code. I want the client to simply paste that into the concert form.) If I sanitize the field before saving I lose the tags.
The doc says to be careful about saving user input. Validate and sanitize. It also says (I recall seeing) that you should use prepared statements when saving data. Does that apply to calls to update_post_meta, which is what I’m using? (How would I do that?) Or is it referring only to any new functions I create that make calls to the database?
And is it less important when we’re talking about the dashboard, as opposed to public comments on the site?
- The topic ‘Does update_post_meta() use sql prepared statements?’ is closed to new replies.