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

@@ -94,7 +94,7 @@ if ( ! class_exists( 'SP_Admin_Permalink_Settings' ) ) :
$key = 'sportspress_' . $slug[0] . '_slug';
$value = null;
if ( isset( $_POST[ $key ] ) ) {
$value = sanitize_text_field( $_POST[ $key ] );
$value = sanitize_text_field( wp_unslash( $_POST[ $key ] ) );
}
if ( empty( $value ) ) {
delete_option( $key );