Sections can be lowered using sanitize_title Closes #4700

@coenjacobs pick me
This commit is contained in:
Mike Jolley 2014-02-11 10:30:37 +00:00 committed by Coen Jacobs
parent df5416d34a
commit 5e02b72f1b
1 changed files with 2 additions and 2 deletions

View File

@ -125,8 +125,8 @@ class WC_Admin_Settings {
self::get_settings_pages();
// Get current tab/section
$current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_text_field( $_GET['tab'] );
$current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_text_field( $_REQUEST['section'] );
$current_tab = empty( $_GET['tab'] ) ? 'general' : sanitize_title( $_GET['tab'] );
$current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );
// Save settings if data has been posted
if ( ! empty( $_POST ) )