|
7 | 7 | /**
|
8 | 8 | * @var \Magento\Review\Block\View $block
|
9 | 9 | * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
|
| 10 | + * @var \Magento\Framework\Escaper $escaper |
10 | 11 | */
|
11 | 12 | ?>
|
12 | 13 | <?php if ($block->getProductData()->getId()): ?>
|
13 | 14 | <div class="product-review">
|
14 | 15 | <div class="page-title-wrapper">
|
15 |
| - <h1><?= $block->escapeHtml(__('Review Details')) ?></h1> |
| 16 | + <h1><?= $escaper->escapeHtml(__('Review Details')) ?></h1> |
16 | 17 | </div>
|
17 | 18 | <div class="product-img-box">
|
18 |
| - <a href="<?= $block->escapeUrl($block->getProductData()->getProductUrl()) ?>"> |
19 |
| - <?= $block->getImage($block->getProductData(), 'product_base_image', ['class' => 'product-image'])->toHtml() |
| 19 | + <a href="<?= $escaper->escapeUrl($block->getProductData()->getProductUrl()) ?>"> |
| 20 | + <?= $block->getImage($block->getProductData(), 'product_base_image', [ |
| 21 | + 'class' => 'product-image'])->toHtml() |
20 | 22 | ?>
|
21 | 23 | </a>
|
22 | 24 | <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
|
23 |
| - <p><?= $block->escapeHtml(__('Average Customer Rating')) ?>:</p> |
| 25 | + <p><?= $escaper->escapeHtml(__('Average Customer Rating')) ?>:</p> |
24 | 26 | <?= $block->getReviewsSummaryHtml($block->getProductData()) ?>
|
25 | 27 | <?php endif; ?>
|
26 | 28 | </div>
|
27 | 29 | <div class="details">
|
28 |
| - <h3 class="product-name"><?= $block->escapeHtml($block->getProductData()->getName()) ?></h3> |
| 30 | + <h3 class="product-name"><?= $escaper->escapeHtml($block->getProductData()->getName()) ?></h3> |
29 | 31 | <?php if ($block->getRating() && $block->getRating()->getSize()): ?>
|
30 |
| - <h4><?= $block->escapeHtml(__('Product Rating:')) ?></h4> |
| 32 | + <h4><?= $escaper->escapeHtml(__('Product Rating:')) ?></h4> |
31 | 33 | <div class="table-wrapper">
|
32 | 34 | <table class="data-table review-summary-table">
|
33 |
| - <caption class="table-caption"><?= $block->escapeHtml(__('Product Rating')) ?></caption> |
| 35 | + <caption class="table-caption"><?= $escaper->escapeHtml(__('Product Rating')) ?></caption> |
34 | 36 | <?php foreach ($block->getRating() as $_rating): ?>
|
35 | 37 | <?php if ($_rating->getPercent()): ?>
|
36 | 38 | <?php $rating = ceil($_rating->getPercent()) ?>
|
37 | 39 | <tr>
|
38 | 40 | <td class="label" width="10%">
|
39 |
| - <?= $block->escapeHtml(__($_rating->getRatingCode())) ?> |
| 41 | + <?= $escaper->escapeHtml(__($_rating->getRatingCode())) ?> |
40 | 42 | </td>
|
41 | 43 | <td class="value">
|
42 | 44 | <?php $ratingId = $_rating->getRatingId() ?>
|
43 | 45 | <div class="rating-summary item"
|
44 |
| - id="rating-div-<?= $block->escapeHtml($ratingId) ?>"> |
| 46 | + id="rating-div-<?= $escaper->escapeHtml($ratingId) ?>"> |
45 | 47 | <div class="rating-result" title="<?= /* @noEscape */ $rating ?>%">
|
46 | 48 | <span style="width: <?= /* @noEscape */ $rating ?>%;">
|
47 | 49 | <span><?= /* @noEscape */ $rating ?>%</span>
|
|
56 | 58 | </div>
|
57 | 59 | <?php endif; ?>
|
58 | 60 | <p class="date">
|
59 |
| - <?= $block->escapeHtml( |
| 61 | + <?= $escaper->escapeHtml( |
60 | 62 | __('Product Review (submitted on %1):', $block->dateFormat($block->getReviewData()->getCreatedAt()))
|
61 | 63 | ) ?>
|
62 | 64 | </p>
|
63 |
| - <p><?= /* @noEscape */ nl2br($block->escapeHtml($block->getReviewData()->getDetail())) ?></p> |
| 65 | + <p><?= /* @noEscape */ nl2br($escaper->escapeHtml($block->getReviewData()->getDetail())) ?></p> |
64 | 66 | </div>
|
65 | 67 | <div class="actions">
|
66 | 68 | <div class="secondary">
|
67 |
| - <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>"> |
68 |
| - <span><?= $block->escapeHtml(__('Back to Product Reviews')) ?></span> |
| 69 | + <a class="action back" href="<?= $escaper->escapeUrl($block->getBackUrl()) ?>"> |
| 70 | + <span><?= $escaper->escapeHtml(__('Back to Product Reviews')) ?></span> |
69 | 71 | </a>
|
70 | 72 | </div>
|
71 | 73 | </div>
|
|
0 commit comments