Sanitize not needed

This commit is contained in:
Mike Jolley 2015-07-27 16:43:05 +01:00
parent 9a7893ba23
commit 8d6858bb80
2 changed files with 2 additions and 2 deletions

View File

@ -643,7 +643,7 @@ class WC_Meta_Box_Product_Data {
$options = wc_get_text_attributes( $attribute['value'] );
foreach ( $options as $option ) {
$selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( sanitize_title( $variation_selected_value ), sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false );
$selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( $variation_selected_value, sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false );
echo '<option ' . $selected . ' value="' . esc_attr( $option ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
}

View File

@ -45,7 +45,7 @@ extract( $variation_data );
$options = wc_get_text_attributes( $attribute['value'] );
foreach ( $options as $option ) {
$selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( sanitize_title( $variation_selected_value ), sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false );
$selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( $variation_selected_value, sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false );
echo '<option ' . $selected . ' value="' . esc_attr( $option ) . '">' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
}