Skip to content
This repository has been archived by the owner on Apr 29, 2019. It is now read-only.

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.3-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - magento/magento2#14016: Open link "Report an Issue" in a new tab (by @DaniloEmpire)
 - magento/magento2#13802: Fix #13652. Mini cart - fix issue in product title with special chars. (by @afirlejczyk)


Fixed GitHub Issues:
 - magento/magento2#14010: Why Report Bugs link not open in new tab? (reported by @webshouters) has been fixed in magento/magento2#14016 by @DaniloEmpire in 2.3-develop branch
   Related commits:
     1. 79e87b4

 - magento/magento2#13652: Issue in product title with special chars in mini cart (reported by @Sunil-Nethues) has been fixed in magento/magento2#13802 by @afirlejczyk in 2.3-develop branch
   Related commits:
     1. 764f086
  • Loading branch information
magento-engcom-team authored Mar 14, 2018
2 parents 4d8c0f7 + 2261550 commit 7acc042
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@

?>
<?php if ($block->getBugreportUrl()): ?>
<a class="link-report" href="<?= /* @escapeNotVerified */ $block->getBugreportUrl() ?>" id="footer_bug_tracking"><?= /* @escapeNotVerified */ __('Report an Issue') ?></a>
<a class="link-report" href="<?= /* @escapeNotVerified */ $block->getBugreportUrl() ?>" id="footer_bug_tracking" target="_blank">
<?= /* @escapeNotVerified */ __('Report an Issue') ?>
</a>
<?php endif; ?>
18 changes: 16 additions & 2 deletions app/code/Magento/Checkout/CustomerData/DefaultItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

namespace Magento\Checkout\CustomerData;

use Magento\Framework\App\ObjectManager;

/**
* Default item
*/
Expand Down Expand Up @@ -36,26 +38,36 @@ class DefaultItem extends AbstractItem
*/
protected $checkoutHelper;

/**
* Escaper
*
* @var \Magento\Framework\Escaper
*/
private $escaper;

/**
* @param \Magento\Catalog\Helper\Image $imageHelper
* @param \Magento\Msrp\Helper\Data $msrpHelper
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool
* @param \Magento\Checkout\Helper\Data $checkoutHelper
* @param \Magento\Framework\Escaper|null $escaper
* @codeCoverageIgnore
*/
public function __construct(
\Magento\Catalog\Helper\Image $imageHelper,
\Magento\Msrp\Helper\Data $msrpHelper,
\Magento\Framework\UrlInterface $urlBuilder,
\Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool,
\Magento\Checkout\Helper\Data $checkoutHelper
\Magento\Checkout\Helper\Data $checkoutHelper,
\Magento\Framework\Escaper $escaper = null
) {
$this->configurationPool = $configurationPool;
$this->imageHelper = $imageHelper;
$this->msrpHelper = $msrpHelper;
$this->urlBuilder = $urlBuilder;
$this->checkoutHelper = $checkoutHelper;
$this->escaper = $escaper ?: ObjectManager::getInstance()->get(\Magento\Framework\Escaper::class);
}

/**
Expand All @@ -64,14 +76,16 @@ public function __construct(
protected function doGetItemData()
{
$imageHelper = $this->imageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');
$productName = $this->escaper->escapeHtml($this->item->getProduct()->getName());

return [
'options' => $this->getOptionList(),
'qty' => $this->item->getQty() * 1,
'item_id' => $this->item->getId(),
'configure_url' => $this->getConfigureUrl(),
'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
'product_id' => $this->item->getProduct()->getId(),
'product_name' => $this->item->getProduct()->getName(),
'product_name' => $productName,
'product_sku' => $this->item->getProduct()->getSku(),
'product_url' => $this->getProductUrl(),
'product_has_url' => $this->hasProductUrl(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="product-item-details">
<strong class="product-item-name">
<!-- ko if: product_has_url -->
<a data-bind="attr: {href: product_url}, text: product_name"></a>
<a data-bind="attr: {href: product_url}, html: product_name"></a>
<!-- /ko -->
<!-- ko ifnot: product_has_url -->
<!-- ko text: product_name --><!-- /ko -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,24 @@ class ConfigurableItem extends DefaultItem
* @param \Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool
* @param \Magento\Checkout\Helper\Data $checkoutHelper
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Escaper|null $escaper
*/
public function __construct(
\Magento\Catalog\Helper\Image $imageHelper,
\Magento\Msrp\Helper\Data $msrpHelper,
\Magento\Framework\UrlInterface $urlBuilder,
\Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool,
\Magento\Checkout\Helper\Data $checkoutHelper,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Escaper $escaper = null
) {
parent::__construct(
$imageHelper,
$msrpHelper,
$urlBuilder,
$configurationPool,
$checkoutHelper
$checkoutHelper,
$escaper
);
$this->_scopeConfig = $scopeConfig;
}
Expand Down
7 changes: 5 additions & 2 deletions app/code/Magento/GroupedProduct/CustomerData/GroupedItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@ class GroupedItem extends DefaultItem
* @param \Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool
* @param \Magento\Checkout\Helper\Data $checkoutHelper
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\Escaper|null $escaper
*/
public function __construct(
\Magento\Catalog\Helper\Image $imageHelper,
\Magento\Msrp\Helper\Data $msrpHelper,
\Magento\Framework\UrlInterface $urlBuilder,
\Magento\Catalog\Helper\Product\ConfigurationPool $configurationPool,
\Magento\Checkout\Helper\Data $checkoutHelper,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\Escaper $escaper = null
) {
parent::__construct(
$imageHelper,
$msrpHelper,
$urlBuilder,
$configurationPool,
$checkoutHelper
$checkoutHelper,
$escaper
);
$this->_scopeConfig = $scopeConfig;
}
Expand Down

0 comments on commit 7acc042

Please sign in to comment.