File tree Expand file tree Collapse file tree 3 files changed +39
-5
lines changed
app/code/Magento/Checkout/view/frontend Expand file tree Collapse file tree 3 files changed +39
-5
lines changed Original file line number Diff line number Diff line change 2121 </item >
2222 <item name =" children" xsi : type =" array" >
2323 <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 >
2525 <item name =" config" xsi : type =" array" >
2626 <item name =" displayArea" xsi : type =" string" >defaultRenderer</item >
2727 <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 2424 < div class ="product-item-details ">
2525 < strong class ="product-item-name ">
2626 <!-- 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 >
2828 <!-- /ko -->
2929 <!-- ko ifnot: product_has_url -->
30- <!-- ko text: product_name --> <!-- /ko -- >
30+ < span data-bind =" html: $parent.getProductNameUnsanitizedHtml( product_name) " > </ span >
3131 <!-- /ko -->
3232 </ strong >
3333
4242 < dt class ="label "> <!-- ko text: option.label --> <!-- /ko --> </ dt >
4343 < dd class ="values ">
4444 <!-- 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 >
4646 <!-- /ko -->
4747 <!-- 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 >
4949 <!-- /ko -->
5050 <!-- ko if: (!Array.isArray(option.value) && !['file', 'html'].includes(option.option_type)) -->
5151 < span data-bind ="text: option.value "> </ span >
You can’t perform that action at this time.
0 commit comments