Skip to content

Commit 5729dfa

Browse files
author
Hwashiang Yu
committed
MAGETWO-55808: Eliminate @escapeNotVerified in Product Modules
- Resolved static test failures
1 parent d4e98ad commit 5729dfa

File tree

2 files changed

+9
-10
lines changed
  • app/code/Magento
    • Bundle/view/adminhtml/templates/product/edit/bundle
    • ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector

2 files changed

+9
-10
lines changed

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<fieldset class="fieldset-alt">
2424
<div class="field field-option-title required">
2525
<label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title">
26-
<?= $block->escapeHtml(__('Option Title'))) ?>
26+
<?= $block->escapeHtml(__('Option Title')) ?>
2727
</label>
2828
<div class="control">
2929
<?php if ($block->isDefaultStore()) : ?>
@@ -54,7 +54,7 @@
5454
<?php if (!$block->isDefaultStore()) : ?>
5555
<div class="field field-option-store-view required">
5656
<label class="label" for="id_<?= $block->escapeHtmlAttr($block->getFieldName()) ?>_<%- data.index %>_title_store">
57-
<?= $block->escapeHtml(__('Store View Title'))) ?>
57+
<?= $block->escapeHtml(__('Store View Title')) ?>
5858
</label>
5959
<div class="control">
6060
<input class="input-text required-entry"
@@ -66,8 +66,8 @@
6666
</div>
6767
<?php endif; ?>
6868
<div class="field field-option-input-type required">
69-
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId() . '_<%- data.index %>_type')) ?>">
70-
<?= $block->escapeHtml(__('Input Type'))) ?>
69+
<label class="label" for="<?= $block->escapeHtmlAttr($block->getFieldId() . '_<%- data.index %>_type') ?>">
70+
<?= $block->escapeHtml(__('Input Type')) ?>
7171
</label>
7272
<div class="control">
7373
<?= $block->getTypeSelectHtml() ?>
@@ -80,14 +80,14 @@
8080
checked="checked"
8181
id="field-option-req" />
8282
<label for="field-option-req">
83-
<?= $block->escapeHtml(__('Required'))) ?>
83+
<?= $block->escapeHtml(__('Required')) ?>
8484
</label>
8585
<span style="display:none"><?= $block->getRequireSelectHtml() ?></span>
8686
</div>
8787
</div>
8888
<div class="field field-option-position no-display">
8989
<label class="label" for="field-option-position">
90-
<?= $block->escapeHtml(__('Position'))) ?>
90+
<?= $block->escapeHtml(__('Position')) ?>
9191
</label>
9292
<div class="control">
9393
<input class="input-text validate-zero-or-greater"
@@ -100,7 +100,7 @@
100100
</fieldset>
101101

102102
<div class="no-products-message">
103-
<?= $block->escapeHtml(__('There are no products in this option.'))) ?>
103+
<?= $block->escapeHtml(__('There are no products in this option.')) ?>
104104
</div>
105105
<?= $block->getAddSelectionButtonHtml() ?>
106106
</fieldset>
@@ -149,7 +149,7 @@ Bundle.Option.prototype = {
149149

150150
add : function(data) {
151151
if (!data) {
152-
data = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(['default_title' => __('New Option')])) ?>;
152+
data = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode(['default_title' => __('New Option')]) ?>;
153153
} else {
154154
data.title = data.title.replace(/</g, "&lt;");
155155
data.title = data.title.replace(/"/g, "&quot;");

app/code/Magento/ConfigurableProduct/view/adminhtml/templates/product/configurable/attribute-selector/js.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
?>
99
<script>
1010
require(["jquery","mage/mage","mage/backend/suggest"], function($){
11-
var options = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getSuggestWidgetOptions())
12-
?>;
11+
var options = <?= /* @noEscape */ $this->helper(Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getSuggestWidgetOptions()) ?>;
1312
$('#configurable-attribute-selector')
1413
.mage('suggest', options)
1514
.on('suggestselect', function (event, ui) {

0 commit comments

Comments
 (0)