esc_attr instead of esc_url to preserve spaces in img src #4842
This commit is contained in:
parent
7789d34baf
commit
a19266b955
|
@ -318,7 +318,7 @@ class WC_Admin_Taxonomies {
|
|||
else
|
||||
$image = wc_placeholder_img_src();
|
||||
|
||||
$columns .= '<img src="' . esc_url( $image ) . '" alt="Thumbnail" class="wp-post-image" height="48" width="48" />';
|
||||
$columns .= '<img src="' . esc_attr( $image ) . '" alt="Thumbnail" class="wp-post-image" height="48" width="48" />';
|
||||
|
||||
}
|
||||
|
||||
|
@ -326,4 +326,4 @@ class WC_Admin_Taxonomies {
|
|||
}
|
||||
}
|
||||
|
||||
new WC_Admin_Taxonomies();
|
||||
new WC_Admin_Taxonomies();
|
||||
|
|
|
@ -1486,7 +1486,7 @@ if ( ! function_exists( 'woocommerce_subcategory_thumbnail' ) ) {
|
|||
}
|
||||
|
||||
if ( $image )
|
||||
echo '<img src="' . esc_url( $image ) . '" alt="' . esc_attr( $category->name ) . '" width="' . esc_attr( $dimensions['width'] ) . '" height="' . esc_attr( $dimensions['height'] ) . '" />';
|
||||
echo '<img src="' . esc_attr( $image ) . '" alt="' . esc_attr( $category->name ) . '" width="' . esc_attr( $dimensions['width'] ) . '" height="' . esc_attr( $dimensions['height'] ) . '" />';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue