diff --git a/includes/admin/reports/class-wc-report-sales-by-product.php b/includes/admin/reports/class-wc-report-sales-by-product.php
index e5edd1a0769..974e93594ee 100644
--- a/includes/admin/reports/class-wc-report-sales-by-product.php
+++ b/includes/admin/reports/class-wc-report-sales-by-product.php
@@ -245,7 +245,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
foreach ( $top_sellers as $product ) {
echo '
' . $product->order_item_qty . ' |
- ' . get_the_title( $product->product_id ) . ' |
+ ' . esc_html( get_the_title( $product->product_id ) ) . ' |
' . $this->sales_sparkline( $product->product_id, 7, 'count' ) . ' |
';
}
@@ -293,7 +293,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
foreach ( $top_freebies as $product ) {
echo '
' . $product->order_item_qty . ' |
- ' . get_the_title( $product->product_id ) . ' |
+ ' . esc_html( get_the_title( $product->product_id ) ) . ' |
' . $this->sales_sparkline( $product->product_id, 7, 'count' ) . ' |
';
}
@@ -333,7 +333,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
foreach ( $top_earners as $product ) {
echo '
' . wc_price( $product->order_item_total ) . ' |
- ' . get_the_title( $product->product_id ) . ' |
+ ' . esc_html( get_the_title( $product->product_id ) ) . ' |
' . $this->sales_sparkline( $product->product_id, 7, 'sales' ) . ' |
';
}
diff --git a/includes/admin/reports/class-wc-report-stock.php b/includes/admin/reports/class-wc-report-stock.php
index 46bcc9f7f51..882e8ac29c0 100644
--- a/includes/admin/reports/class-wc-report-stock.php
+++ b/includes/admin/reports/class-wc-report-stock.php
@@ -101,7 +101,7 @@ class WC_Report_Stock extends WP_List_Table {
case 'parent' :
if ( $item->parent ) {
- echo get_the_title( $item->parent );
+ echo esc_html( get_the_title( $item->parent ) );
} else {
echo '-';
}