66
77/**
88 * @var \Magento\Review\Block\Customer\ListCustomer $block
9+ * @var \Magento\Framework\Escaper $escaper
910 * @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
1011 */
1112
@@ -15,36 +16,36 @@ $reviewHelper = $block->getData('reviewHelper');
1516<?php if ($ block ->getReviews () && count ($ block ->getReviews ())): ?>
1617 <div class="table-wrapper reviews">
1718 <table class="data table table-reviews" id="my-reviews-table">
18- <caption class="table-caption"><?= $ block ->escapeHtml (__ ('Product Reviews ' )) ?> </caption>
19+ <caption class="table-caption"><?= $ escaper ->escapeHtml (__ ('Product Reviews ' )) ?> </caption>
1920 <thead>
2021 <tr>
21- <th scope="col" class="col date"><?= $ block ->escapeHtml (__ ('Created ' )) ?> </th>
22- <th scope="col" class="col item"><?= $ block ->escapeHtml (__ ('Product Name ' )) ?> </th>
23- <th scope="col" class="col summary"><?= $ block ->escapeHtml (__ ('Rating ' )) ?> </th>
24- <th scope="col" class="col description"><?= $ block ->escapeHtml (__ ('Review ' )) ?> </th>
22+ <th scope="col" class="col date"><?= $ escaper ->escapeHtml (__ ('Created ' )) ?> </th>
23+ <th scope="col" class="col item"><?= $ escaper ->escapeHtml (__ ('Product Name ' )) ?> </th>
24+ <th scope="col" class="col summary"><?= $ escaper ->escapeHtml (__ ('Rating ' )) ?> </th>
25+ <th scope="col" class="col description"><?= $ escaper ->escapeHtml (__ ('Review ' )) ?> </th>
2526 <th scope="col" class="col actions"> </th>
2627 </tr>
2728 </thead>
2829 <tbody>
2930 <?php foreach ($ block ->getReviews () as $ review ): ?>
3031 <tr>
31- <td data-th="<?= $ block ->escapeHtml (__ ('Created ' )) ?> "
32- class="col date"><?= $ block ->escapeHtml ($ block ->dateFormat ($ review ->getReviewCreatedAt ())) ?>
32+ <td data-th="<?= $ escaper ->escapeHtml (__ ('Created ' )) ?> "
33+ class="col date"><?= $ escaper ->escapeHtml ($ block ->dateFormat ($ review ->getReviewCreatedAt ())) ?>
3334 </td>
34- <td data-th="<?= $ block ->escapeHtml (__ ('Product Name ' )) ?> " class="col item">
35+ <td data-th="<?= $ escaper ->escapeHtml (__ ('Product Name ' )) ?> " class="col item">
3536 <strong class="product-name">
36- <a href="<?= $ block ->escapeUrl ($ block ->getProductUrl ($ review )) ?> ">
37- <?= $ block ->escapeHtml ($ review ->getName ()) ?>
37+ <a href="<?= $ escaper ->escapeUrl ($ block ->getProductUrl ($ review )) ?> ">
38+ <?= $ escaper ->escapeHtml ($ review ->getName ()) ?>
3839 </a>
3940 </strong>
4041 </td>
41- <td data-th="<?= $ block ->escapeHtml (__ ('Rating ' )) ?> " class="col summary">
42+ <td data-th="<?= $ escaper ->escapeHtml (__ ('Rating ' )) ?> " class="col summary">
4243 <?php if ($ review ->getSum ()): ?>
4344 <div class="rating-summary">
44- <span class="label"><span><?= $ block ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
45+ <span class="label"><span><?= $ escaper ->escapeHtml (__ ('Rating ' )) ?> :</span></span>
4546 <div class="rating-result"
4647 title="<?= /* @noEscape */ ((int )$ review ->getSum () / (int )$ review ->getCount ()) ?> %">
47- <span>
48+ <span class="rating_ <?= $ escaper -> escapeUrl ( $ review -> getReviewId ()) ?> " >
4849 <span>
4950 <?= /* @noEscape */ ((int )$ review ->getSum () / (int )$ review ->getCount ()) ?> %
5051 </span>
@@ -53,16 +54,16 @@ $reviewHelper = $block->getData('reviewHelper');
5354 </div>
5455 <?= /* @noEscape */ $ secureRenderer ->renderStyleAsTag (
5556 "width: " . /* @noEscape */ ((int )$ review ->getSum () / (int )$ review ->getCount ()) . "%; " ,
56- 'div.rating-summary div.rating-result>span:first-child '
57+ 'div.rating-summary div.rating-result>span.rating_ ' . $ escaper -> escapeUrl ( $ review -> getReviewId ())
5758 ) ?>
5859 <?php endif ; ?>
5960 </td>
60- <td data-th="<?= $ block ->escapeHtmlAttr (__ ('Review ' )) ?> " class="col description">
61+ <td data-th="<?= $ escaper ->escapeHtmlAttr (__ ('Review ' )) ?> " class="col description">
6162 <?= $ reviewHelper ->getDetailHtml ($ review ->getDetail ()) ?>
6263 </td>
63- <td data-th="<?= $ block ->escapeHtmlAttr (__ ('Actions ' )) ?> " class="col actions">
64- <a href="<?= $ block ->escapeUrl ($ block ->getReviewUrl ($ review )) ?> " class="action more">
65- <span><?= $ block ->escapeHtml (__ ('See Details ' )) ?> </span>
64+ <td data-th="<?= $ escaper ->escapeHtmlAttr (__ ('Actions ' )) ?> " class="col actions">
65+ <a href="<?= $ escaper ->escapeUrl ($ block ->getReviewUrl ($ review )) ?> " class="action more">
66+ <span><?= $ escaper ->escapeHtml (__ ('See Details ' )) ?> </span>
6667 </a>
6768 </td>
6869 </tr>
@@ -76,12 +77,12 @@ $reviewHelper = $block->getData('reviewHelper');
7677 </div>
7778 <?php endif ; ?>
7879<?php else : ?>
79- <div class="message info empty"><span><?= $ block ->escapeHtml (__ ('You have submitted no reviews. ' )) ?> </span></div>
80+ <div class="message info empty"><span><?= $ escaper ->escapeHtml (__ ('You have submitted no reviews. ' )) ?> </span></div>
8081<?php endif ; ?>
8182<div class="actions-toolbar">
8283 <div class="secondary">
83- <a class="action back" href="<?= $ block ->escapeUrl ($ block ->getBackUrl ()) ?> ">
84- <span><?= $ block ->escapeHtml (__ ('Back ' )) ?> </span>
84+ <a class="action back" href="<?= $ escaper ->escapeUrl ($ block ->getBackUrl ()) ?> ">
85+ <span><?= $ escaper ->escapeHtml (__ ('Back ' )) ?> </span>
8586 </a>
8687 </div>
8788</div>
0 commit comments