File tree 3 files changed +21
-1
lines changed
app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute
dev/tests/functional/tests/app/Magento/Catalog/Test
Repository/CatalogProductAttribute
TestCase/ProductAttribute
3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,9 @@ $stores = $block->getStoresSortedBySortOrder();
88
88
$ values = [];
89
89
foreach ($ block ->getOptionValues () as $ value ) {
90
90
$ value = $ value ->getData ();
91
- $ values [] = is_array ($ value ) ? array_map ("htmlspecialchars_decode " , $ value ) : $ value ;
91
+ $ values [] = is_array ($ value ) ? array_map (function ($ str ) {
92
+ return htmlspecialchars_decode ($ str , ENT_QUOTES );
93
+ }, $ value ) : $ value ;
92
94
}
93
95
?>
94
96
<script type="text/x-magento-init">
Original file line number Diff line number Diff line change 22
22
<item name =" admin" xsi : type =" string" >white</item >
23
23
</field >
24
24
</dataset >
25
+
26
+ <dataset name =" option_with_single_quotation" >
27
+ <field name =" 0" xsi : type =" array" >
28
+ <item name =" is_default" xsi : type =" string" >Yes</item >
29
+ <item name =" admin" xsi : type =" string" >test option with single\' </item >
30
+ </field >
31
+ </dataset >
25
32
</repository >
26
33
</config >
Original file line number Diff line number Diff line change 208
208
<data name =" productAttribute/data/is_comparable" xsi : type =" string" >Yes</data >
209
209
<constraint name =" Magento\Catalog\Test\Constraint\AssertProductAttributeIsUnique" />
210
210
</variation >
211
+ <variation name =" CreateProductAttributeEntityTestVariation10" summary =" Create custom dropdown attribute with single quotation in option" >
212
+ <data name =" attributeSet/dataset" xsi : type =" string" >custom_attribute_set</data >
213
+ <data name =" productAttribute/data/frontend_label" xsi : type =" string" >Dropdown_Admin_%isolation%</data >
214
+ <data name =" productAttribute/data/frontend_input" xsi : type =" string" >Dropdown</data >
215
+ <data name =" productAttribute/data/options/dataset" xsi : type =" string" >option_with_single_quotation</data >
216
+ <data name =" productAttribute/data/is_required" xsi : type =" string" >Yes</data >
217
+ <data name =" productAttribute/data/attribute_code" xsi : type =" string" >attr_dropdown_%isolation%</data >
218
+ <data name =" productAttribute/data/is_global" xsi : type =" string" >Global</data >
219
+ <data name =" productAttribute/data/is_unique" xsi : type =" string" >No</data >
220
+ <constraint name =" Magento\Catalog\Test\Constraint\AssertAttributeForm" />
221
+ </variation >
211
222
</testCase >
212
223
</config >
You can’t perform that action at this time.
0 commit comments