esc_attr instead of esc_url to preserve spaces in img src #4842

This commit is contained in:
Coen Jacobs 2014-02-17 11:29:12 +01:00
parent a2aa4ec9a9
commit a610e72c09
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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'] ) . '" />';
}
}