Using the get_option() function and escaping
-
Hi,
I’m using
get_option()
quite a lot inside my plugin, to retrieve settings from my DB.Many settings are checkboxes, with value “true” or “false”.
By default I use escaping:
esc_attr( get_option('my-setting') );
My question: is it necessary to escape the output in this case? The value in DB is always “true” or “false”. And I do sanitize upon input.
Guido
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using the get_option() function and escaping’ is closed to new replies.