File tree 3 files changed +39
-5
lines changed
app/code/Magento/Checkout/view/frontend
3 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 21
21
</item >
22
22
<item name =" children" xsi : type =" array" >
23
23
<item name =" item.renderer" xsi : type =" array" >
24
- <item name =" component" xsi : type =" string" >uiComponent </item >
24
+ <item name =" component" xsi : type =" string" >Magento_Checkout/js/view/cart-item-renderer </item >
25
25
<item name =" config" xsi : type =" array" >
26
26
<item name =" displayArea" xsi : type =" string" >defaultRenderer</item >
27
27
<item name =" template" xsi : type =" string" >Magento_Checkout/minicart/item/default</item >
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright © Magento, Inc. All rights reserved.
3
+ * See COPYING.txt for license details.
4
+ */
5
+
6
+ define ( [
7
+ 'uiComponent'
8
+ ] , function ( Component ) {
9
+ 'use strict' ;
10
+
11
+ return Component . extend ( {
12
+ /**
13
+ * Prepare the product name value to be rendered as HTML
14
+ *
15
+ * @param {String } productName
16
+ * @return {String }
17
+ */
18
+ getProductNameUnsanitizedHtml : function ( productName ) {
19
+ // product name has already escaped on backend
20
+ return productName ;
21
+ } ,
22
+
23
+ /**
24
+ * Prepare the given option value to be rendered as HTML
25
+ *
26
+ * @param {String } optionValue
27
+ * @return {String }
28
+ */
29
+ getOptionValueUnsanitizedHtml : function ( optionValue ) {
30
+ // option value has already escaped on backend
31
+ return optionValue ;
32
+ }
33
+ } ) ;
34
+ } ) ;
Original file line number Diff line number Diff line change 24
24
< div class ="product-item-details ">
25
25
< strong class ="product-item-name ">
26
26
<!-- ko if: product_has_url -->
27
- < a data-bind ="attr: {href: product_url}, html: product_name "> </ a >
27
+ < a data-bind ="attr: {href: product_url}, html: $parent.getProductNameUnsanitizedHtml( product_name) "> </ a >
28
28
<!-- /ko -->
29
29
<!-- ko ifnot: product_has_url -->
30
- <!-- ko text: product_name --> <!-- /ko -- >
30
+ < span data-bind =" html: $parent.getProductNameUnsanitizedHtml( product_name) " > </ span >
31
31
<!-- /ko -->
32
32
</ strong >
33
33
42
42
< dt class ="label "> <!-- ko text: option.label --> <!-- /ko --> </ dt >
43
43
< dd class ="values ">
44
44
<!-- ko if: Array.isArray(option.value) -->
45
- < span data-bind ="html: option.value.join('<br>' ) "> </ span >
45
+ < span data-bind ="html: $parents[1].getOptionValueUnsanitizedHtml( option.value.join('<br/>') ) "> </ span >
46
46
<!-- /ko -->
47
47
<!-- ko if: (!Array.isArray(option.value) && ['file', 'html'].includes(option.option_type)) -->
48
- < span data-bind ="html: option.value "> </ span >
48
+ < span data-bind ="html: $parents[1].getOptionValueUnsanitizedHtml( option.value) "> </ span >
49
49
<!-- /ko -->
50
50
<!-- ko if: (!Array.isArray(option.value) && !['file', 'html'].includes(option.option_type)) -->
51
51
< span data-bind ="text: option.value "> </ span >
You can’t perform that action at this time.
0 commit comments