From 26a879fb9a4edff0afe81b1e5fd30043334fe005 Mon Sep 17 00:00:00 2001 From: sergey Date: Sat, 16 Jan 2021 15:06:13 +0200 Subject: [PATCH] Magento_CatalogInventory: avoid using deprecated escape* methods from AbstractBlock --- .../frontend/templates/qtyincrements.phtml | 3 ++- .../templates/stockqty/composite.phtml | 21 ++++++++++--------- .../frontend/templates/stockqty/default.phtml | 5 +++-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml index 8b63d29be8154..085658c4abb44 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/qtyincrements.phtml @@ -6,10 +6,11 @@ /** * @var $block \Magento\CatalogInventory\Block\Qtyincrements + * @var \Magento\Framework\Escaper $escaper */ ?> getProductQtyIncrements()) : ?>
- escapeHtml(__('%1 is available to buy in increments of %2', $block->getProductName(), $block->getProductQtyIncrements())) ?> + escapeHtml(__('%1 is available to buy in increments of %2', $block->getProductName(), $block->getProductQtyIncrements())) ?>
diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml index de667d19fadb0..1b05fd264035b 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/composite.phtml @@ -6,26 +6,27 @@ /** * @var $block \Magento\CatalogInventory\Block\Stockqty\Composite + * @var \Magento\Framework\Escaper $escaper */ ?> isMsgVisible()) : ?>
- {$block->escapeHtml($block->getStockQtyLeft())}") ?> + {$escaper->escapeHtml($block->getStockQtyLeft())}") ?>
-
+
- + - - + + @@ -33,8 +34,8 @@ getProductStockQty($childProduct); ?> 0) : ?> - - + + diff --git a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml index c32cb9dd6ecda..7b38c24beb5bb 100644 --- a/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml +++ b/app/code/Magento/CatalogInventory/view/frontend/templates/stockqty/default.phtml @@ -6,10 +6,11 @@ /** * @var $block \Magento\CatalogInventory\Block\Stockqty\DefaultStockqty + * @var \Magento\Framework\Escaper $escaper */ ?> isMsgVisible()) : ?> -
- {$block->escapeHtml($block->getStockQtyLeft())}") ?> +
+ {$escaper->escapeHtml($block->getStockQtyLeft())}") ?>
escapeHtml(__('Product availability')) ?>escapeHtml(__('Product availability')) ?>
escapeHtml(__('Product Name')) ?>escapeHtml(__('Qty')) ?>escapeHtml(__('Product Name')) ?>escapeHtml(__('Qty')) ?>
escapeHtml($childProduct->getName()) ?>escapeHtml($childProductStockQty) ?>escapeHtml($childProduct->getName()) ?>escapeHtml($childProductStockQty) ?>