Skip to content

Commit 8baeec3

Browse files
committed
Fixed issue #24779
1 parent 419fbf3 commit 8baeec3

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

app/code/Magento/Checkout/view/frontend/templates/button.phtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
<?php /** @var $block \Magento\Checkout\Block\Onepage\Success */ ?>
88

99
<?php if ($block->getCanViewOrder() && $block->getCanPrintOrder()) :?>
10-
<a href="<?= $block->escapeUrl($block->getPrintUrl()) ?>" target="_blank" class="print">
10+
<a href="<?= $block->escapeUrl($block->getPrintUrl()) ?>"
11+
class="action print"
12+
target="_blank"
13+
rel="noopener">
1114
<?= $block->escapeHtml(__('Print receipt')) ?>
1215
</a>
1316
<?= $block->getChildHtml() ?>

app/code/Magento/Sales/view/frontend/templates/order/creditmemo/items.phtml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
<?php $_order = $block->getOrder() ?>
88
<div class="actions-toolbar">
99
<a href="<?= $block->escapeUrl($block->getPrintAllCreditmemosUrl($_order)) ?>"
10-
onclick="this.target='_blank'"
11-
class="action print">
10+
class="action print"
11+
target="_blank"
12+
rel="noopener">
1213
<span><?= $block->escapeHtml(__('Print All Refunds')) ?></span>
1314
</a>
1415
</div>
1516
<?php foreach ($_order->getCreditmemosCollection() as $_creditmemo) : ?>
1617
<div class="order-title">
1718
<strong><?= $block->escapeHtml(__('Refund #')) ?><?= $block->escapeHtml($_creditmemo->getIncrementId()) ?> </strong>
1819
<a href="<?= $block->escapeUrl($block->getPrintCreditmemoUrl($_creditmemo)) ?>"
19-
onclick="this.target='_blank'"
20-
class="action print">
20+
class="action print"
21+
target="_blank"
22+
rel="noopener">
2123
<span><?= $block->escapeHtml(__('Print Refund')) ?></span>
2224
</a>
2325
</div>

app/code/Magento/Sales/view/frontend/templates/order/info/buttons.phtml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
<span><?= $block->escapeHtml(__('Reorder')) ?></span>
1717
</a>
1818
<?php endif ?>
19-
<a class="action print"
20-
href="<?= $block->escapeUrl($block->getPrintUrl($_order)) ?>"
21-
onclick="this.target='_blank';">
19+
<a href="<?= $block->escapeUrl($block->getPrintUrl($_order)) ?>"
20+
class="action print"
21+
target="_blank"
22+
rel="noopener">
2223
<span><?= $block->escapeHtml(__('Print Order')) ?></span>
2324
</a>
2425
<?= $block->getChildHtml() ?>

app/code/Magento/Sales/view/frontend/templates/order/invoice/items.phtml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
<?php $_order = $block->getOrder() ?>
88
<div class="actions-toolbar">
99
<a href="<?= $block->escapeUrl($block->getPrintAllInvoicesUrl($_order)) ?>"
10+
class="action print"
1011
target="_blank"
11-
class="action print">
12+
rel="noopener">
1213
<span><?= $block->escapeHtml(__('Print All Invoices')) ?></span>
1314
</a>
1415
</div>
1516
<?php foreach ($_order->getInvoiceCollection() as $_invoice) : ?>
1617
<div class="order-title">
1718
<strong><?= $block->escapeHtml(__('Invoice #')) ?><?= $block->escapeHtml($_invoice->getIncrementId()) ?></strong>
1819
<a href="<?= $block->escapeUrl($block->getPrintInvoiceUrl($_invoice)) ?>"
19-
onclick="this.target='_blank'"
20-
class="action print">
20+
class="action print"
21+
target="_blank"
22+
rel="noopener">
2123
<span><?= $block->escapeHtml(__('Print Invoice')) ?></span>
2224
</a>
2325
</div>

app/code/Magento/Shipping/view/frontend/templates/items.phtml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@
1515
<?= $block->getChildHtml('track-all-link') ?>
1616
<?php endif; ?>
1717
<a href="<?= $block->escapeUrl($block->getPrintAllShipmentsUrl($_order)) ?>"
18-
onclick="this.target='_blank'"
19-
class="action print">
18+
class="action print"
19+
target="_blank"
20+
rel="noopener">
2021
<span><?= $block->escapeHtml(__('Print All Shipments')) ?></span>
2122
</a>
2223
</div>
2324
<?php foreach ($_order->getShipmentsCollection() as $_shipment) : ?>
2425
<div class="order-title">
2526
<strong><?= $block->escapeHtml(__('Shipment #')) ?><?= $block->escapeHtml($_shipment->getIncrementId()) ?></strong>
2627
<a href="<?= $block->escapeUrl($block->getPrintShipmentUrl($_shipment)) ?>"
27-
onclick="this.target='_blank'"
28-
class="action print">
28+
class="action print"
29+
target="_blank"
30+
rel="noopener">
2931
<span><?= $block->escapeHtml(__('Print Shipment')) ?></span>
3032
</a>
3133
<a href="#"

0 commit comments

Comments
 (0)