Merge pull request #19671 from woocommerce/fix/19661

sanitize_text_field does not preserve line breaks. wp_kses_post seems more appropriate.
This commit is contained in:
Claudio Sanches 2018-04-10 11:49:51 -03:00 committed by GitHub
commit 2a4b364069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class WC_Order_Item extends WC_Data implements ArrayAccess {
$meta->value = rawurldecode( (string) $meta->value );
$attribute_key = str_replace( 'attribute_', '', $meta->key );
$display_key = wc_attribute_label( $attribute_key, $product );
$display_value = sanitize_text_field( $meta->value );
$display_value = wp_kses_post( $meta->value );
if ( taxonomy_exists( $attribute_key ) ) {
$term = get_term_by( 'slug', $meta->value, $attribute_key );