Sanitize and unslash all inputs

This commit is contained in:
Brian Miyaji
2021-11-14 13:49:51 +09:00
parent 8873e5adeb
commit a605d7ed1a
30 changed files with 98 additions and 98 deletions

View File

@@ -309,7 +309,7 @@ if ( ! function_exists( 'sp_nonce' ) ) {
if ( ! function_exists( 'sp_get_option' ) ) {
function sp_get_option( $option, $default = null ) {
if ( isset( $_POST[ $option ] ) ) {
return $_POST[ $option ];
sanitize_text_field( wp_unslash( $_POST[ $option ] ) );
} else {
return get_option( $option, $default );
}