Skip to content

Remove space in class attribute #39970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: 2.4-develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// phpcs:disable Generic.Files.LineLength

/** @var $block \Magento\Checkout\Block\Cart\Item\Renderer */
/** @var \Magento\Framework\Escaper $escaper */

$_item = $block->getItem();
$product = $_item->getProduct();
Expand All @@ -18,10 +19,10 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
?>
<tbody class="cart item">
<tr class="item-info">
<td data-th="<?= $block->escapeHtml(__('Item')) ?>" class="col item">
<td data-th="<?= $escaper->escapeHtml(__('Item')) ?>" class="col item">
<?php if ($block->hasProductUrl()): ?>
<a href="<?= $block->escapeUrl($block->getProductUrl()) ?>"
title="<?= $block->escapeHtml($block->getProductName()) ?>"
<a href="<?= $escaper->escapeUrl($block->getProductUrl()) ?>"
title="<?= $escaper->escapeHtml($block->getProductName()) ?>"
tabindex="-1"
class="product-item-photo">
<?php else: ?>
Expand All @@ -36,30 +37,30 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
<div class="product-item-details">
<strong class="product-item-name">
<?php if ($block->hasProductUrl()): ?>
<a href="<?= $block->escapeUrl($block->getProductUrl()) ?>"><?= $block->escapeHtml($block->getProductName()) ?></a>
<a href="<?= $escaper->escapeUrl($block->getProductUrl()) ?>"><?= $escaper->escapeHtml($block->getProductName()) ?></a>
<?php else: ?>
<?= $block->escapeHtml($block->getProductName()) ?>
<?= $escaper->escapeHtml($block->getProductName()) ?>
<?php endif; ?>
</strong>
<?php if ($_options = $block->getOptionList()): ?>
<dl class="item-options">
<?php foreach ($_options as $_option): ?>
<?php $_formatedOptionValue = $block->getFormatedOptionValue($_option) ?>
<dt><?= $block->escapeHtml($_option['label']) ?></dt>
<dt><?= $escaper->escapeHtml($_option['label']) ?></dt>
<dd>
<?php if (isset($_formatedOptionValue['full_view'])): ?>
<?= $block->escapeHtml($_formatedOptionValue['full_view'], ['span', 'a']) ?>
<?= $escaper->escapeHtml($_formatedOptionValue['full_view'], ['span', 'a']) ?>
<?php else: ?>
<?= $block->escapeHtml($_formatedOptionValue['value'], ['span', 'a']) ?>
<?= $escaper->escapeHtml($_formatedOptionValue['value'], ['span', 'a']) ?>
<?php endif; ?>
</dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php if ($messages = $block->getMessages()): ?>
<?php foreach ($messages as $message): ?>
<div class= "cart item message <?= $block->escapeHtmlAttr($message['type']) ?>">
<div><?= $block->escapeHtml($message['text']) ?></div>
<div class="cart item message <?= $escaper->escapeHtmlAttr($message['type']) ?>">
<div><?= $escaper->escapeHtml($message['text']) ?></div>
</div>
<?php endforeach; ?>
<?php endif; ?>
Expand All @@ -71,53 +72,53 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
</td>

<?php if ($canApplyMsrp): ?>
<td class="col msrp" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<td class="col msrp" data-th="<?= $escaper->escapeHtml(__('Price')) ?>">
<span class="pricing msrp">
<span class="msrp notice"><?= $block->escapeHtml(__('See price before order confirmation.')) ?></span>
<span class="msrp notice"><?= $escaper->escapeHtml(__('See price before order confirmation.')) ?></span>
<?php $helpLinkId = 'cart-msrp-help-' . $_item->getId(); ?>
<a href="#" class="action help map"
id="<?= ($block->escapeHtmlAttr($helpLinkId)) ?>"
id="<?= ($escaper->escapeHtmlAttr($helpLinkId)) ?>"
data-mage-init='{"addToCart":{
"origin": "info",
"helpLinkId": "#<?= $block->escapeJs($block->escapeHtml($helpLinkId)) ?>",
"productName": "<?= $block->escapeJs($block->escapeHtml($product->getName())) ?>",
"helpLinkId": "#<?= $escaper->escapeJs($escaper->escapeHtml($helpLinkId)) ?>",
"productName": "<?= $escaper->escapeJs($escaper->escapeHtml($product->getName())) ?>",
"showAddToCart": false
}
}'
>
<span><?= $block->escapeHtml(__("What's this?")) ?></span>
<span><?= $escaper->escapeHtml(__("What's this?")) ?></span>
</a>
</span>
</td>
<?php else: ?>
<td class="col price" data-th="<?= $block->escapeHtml(__('Price')) ?>">
<td class="col price" data-th="<?= $escaper->escapeHtml(__('Price')) ?>">
<?= $block->getUnitPriceHtml($_item) ?>
</td>
<?php endif; ?>
<td class="col qty" data-th="<?= $block->escapeHtml(__('Qty')) ?>">
<td class="col qty" data-th="<?= $escaper->escapeHtml(__('Qty')) ?>">
<div class="field qty">
<div class="control qty">
<label for="cart-<?= $block->escapeHtmlAttr($_item->getId()) ?>-qty">
<span class="label"><?= $block->escapeHtml(__('Qty')) ?></span>
<input id="cart-<?= $block->escapeHtmlAttr($_item->getId()) ?>-qty"
name="cart[<?= $block->escapeHtmlAttr($_item->getId()) ?>][qty]"
data-cart-item-id="<?= $block->escapeHtmlAttr($_item->getSku()) ?>"
value="<?= $block->escapeHtmlAttr($block->getQty()) ?>"
<label for="cart-<?= $escaper->escapeHtmlAttr($_item->getId()) ?>-qty">
<span class="label"><?= $escaper->escapeHtml(__('Qty')) ?></span>
<input id="cart-<?= $escaper->escapeHtmlAttr($_item->getId()) ?>-qty"
name="cart[<?= $escaper->escapeHtmlAttr($_item->getId()) ?>][qty]"
data-cart-item-id="<?= $escaper->escapeHtmlAttr($_item->getSku()) ?>"
value="<?= $escaper->escapeHtmlAttr($block->getQty()) ?>"
type="number"
min="0"
size="4"
step="any"
title="<?= $block->escapeHtmlAttr(__('Qty')) ?>"
title="<?= $escaper->escapeHtmlAttr(__('Qty')) ?>"
class="input-text qty"
data-validate="{required:true,'validate-greater-than-zero':true}"
data-item-qty="<?= $block->escapeHtmlAttr($block->getQty()) ?>"
data-item-qty="<?= $escaper->escapeHtmlAttr($block->getQty()) ?>"
data-role="cart-item-qty"/>
</label>
</div>
</div>
</td>

<td class="col subtotal" data-th="<?= $block->escapeHtml(__('Subtotal')) ?>">
<td class="col subtotal" data-th="<?= $escaper->escapeHtml(__('Subtotal')) ?>">
<?php if ($canApplyMsrp): ?>
<span class="cart msrp subtotal">--</span>
<?php else: ?>
Expand Down