Sanitize not needed
This commit is contained in:
parent
9a7893ba23
commit
8d6858bb80
|
@ -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>';
|
||||
}
|
||||
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue