File tree Expand file tree Collapse file tree 5 files changed +23
-8
lines changed
adminhtml/templates/support Expand file tree Collapse file tree 5 files changed +23
-8
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
/** @var \Magento\Backend\Block\Template $block */
4
-
4
+ /** @var \Magento\Framework\Escaper $escaper */
5
+ /** TODO:Reevaluate PHPCS ignores and enables/disables */
5
6
/** @var \Algolia\AlgoliaSearch\ViewModel\Adminhtml\Support\Overview $view */
6
7
$ view = $ block ->getViewModel ();
7
8
@@ -31,10 +32,11 @@ $videoFeatures = $block->getViewFileUrl('Algolia_AlgoliaSearch::images/video-fea
31
32
<div id="algolia_support_tab_content">
32
33
33
34
<div class="algolia_support_panel" id="algolia-documentation-panel">
34
-
35
+ <!-- phpcs:disable Magento2.Security.EscapeOutput.OutputNotEscaped -->
35
36
<script>
36
37
const noResultsIllustration = "<?php echo $ noResultsIllustration ; ?> "
37
38
</script>
39
+ <!-- phpcs:enable Magento2.Security.EscapeOutput.OutputNotEscaped -->
38
40
39
41
<div class="search-box-wrapper">
40
42
<input type="text" name="q" id="search_box" />
Original file line number Diff line number Diff line change 1
1
<?php
2
+ /** @var \Magento\Framework\Escaper $escaper */
3
+ /** TODO:Reevaluate PHPCS ignores and enables/disables */
2
4
/** @var \Algolia\AlgoliaSearch\Block\Checkout\Conversion $block */
3
5
$ orderItemsJson = $ block ->getOrderItemsConversionJson ();
4
6
?>
5
-
7
+ <!-- phpcs:disable Magento2.Security.EscapeOutput.OutputNotEscaped -->
6
8
<script type="text/javascript">
7
- var algoliaOrderConversionJson = <?php echo $ orderItemsJson ?> ;
8
- </script>
9
+ var algoliaOrderConversionJson = <?= $ orderItemsJson ?> ;
10
+ </script>
11
+ <!-- phpcs:enable Magento2.Security.EscapeOutput.OutputNotEscaped -->
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /** @var \Magento\Framework\Escaper $escaper */
3
+ /** TODO:Reevaluate PHPCS ignores and enables/disables */
4
+ ?>
1
5
<div class="algolia-range-slider" data-role="<?php /* @noEscape */ echo $ block ->getDataRole (); ?> ">
2
6
<div data-role="from-label"></div>
3
7
<div data-role="to-label"></div>
10
14
</div>
11
15
</div>
12
16
</div>
13
-
17
+ <!-- phpcs:disable Magento2.Security.EscapeOutput.OutputNotEscaped -->
14
18
<script type="text/x-magento-init">
15
- { "[data-role=<?php /* @noEscape */ echo $ block ->getDataRole (); ?> ]" : { "rangeSlider" : <?php echo /* @noEscape */ $ block ->getJsonConfig (); ?> } }
19
+ { "[data-role=<?php /* @noEscape */ echo $ block ->getDataRole (); ?> ]" : { "rangeSlider" : <?= /* @noEscape */ $ block ->getJsonConfig (); ?> } }
16
20
</script>
21
+ <!-- phpcs:enable Magento2.Security.EscapeOutput.OutputNotEscaped -->
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/** @var \Algolia\AlgoliaSearch\ViewModel\Recommend\Cart $block */
3
+ /** @var \Magento\Framework\Escaper $escaper */
4
+ /** TODO:Reevaluate PHPCS ignores and enables/disables */
3
5
$ viewModel = $ block ->getViewModel ();
4
6
$ recommendConfig = $ viewModel ->getAlgoliaRecommendConfiguration ();
5
7
if (!empty ($ recommendConfig ['enabledRelatedInCart ' ]) || !empty ($ recommendConfig ['enabledFBTInCart ' ]) || !empty ($ recommendConfig ['isTrendItemsEnabledInCartPage ' ])):
@@ -11,6 +13,7 @@ if (!empty($recommendConfig['enabledRelatedInCart']) || !empty($recommendConfig[
11
13
<div id="trendItems" class="trendsItem recommend-component"></div>
12
14
<div id="lookingSimilar" class="lookingSimilar recommend-component"></div>
13
15
</div>
16
+ <!-- phpcs:disable Magento2.Security.EscapeOutput.OutputNotEscaped -->
14
17
<script type="text/x-magento-init">
15
18
{
16
19
"*": {
@@ -20,6 +23,7 @@ if (!empty($recommendConfig['enabledRelatedInCart']) || !empty($recommendConfig[
20
23
}
21
24
}
22
25
</script>
26
+ <!-- phpcs:enable Magento2.Security.EscapeOutput.OutputNotEscaped -->
23
27
<script type="text/x-magento-init">
24
28
{
25
29
"[data-role=tocart-form]": {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use Magento\Framework\View\Element\Template;
5
5
/**
6
6
* @var ProductView $viewModel
7
7
* @var Template $block
8
+ * @var \Magento\Framework\Escaper $escaper
8
9
*/
9
10
$ viewModel = $ block ->getViewModel ();
10
11
$ recommendConfig = $ viewModel ->getAlgoliaRecommendConfiguration ();
@@ -24,7 +25,7 @@ if (!empty($recommendConfig['enabledFBT'])
24
25
{
25
26
"*": {
26
27
"Algolia_AlgoliaSearch/js/recommend" : {
27
- "objectIDs" : ["<?= $ product ->getId () ?> "]
28
+ "objectIDs" : ["<?= $ escaper -> escapeJs ( $ product ->getId () ) ?> "]
28
29
}
29
30
}
30
31
}
You can’t perform that action at this time.
0 commit comments