Skip to content

Commit 6a5e8ad

Browse files
committed
Merge remote-tracking branch 'origin/MC-38384' into 2.3.7-develop-pr153
2 parents a73fe1c + 4275d90 commit 6a5e8ad

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'Magento_Ui/js/grid/columns/column',
8+
'escaper'
9+
], function (Column, escaper) {
10+
'use strict';
11+
12+
return Column.extend({
13+
defaults: {
14+
allowedTags: ['div', 'span', 'b', 'strong', 'i', 'em', 'u', 'a']
15+
},
16+
17+
/**
18+
* Name column.
19+
*
20+
* @param {String} label
21+
* @returns {String}
22+
*/
23+
getSafeHtml: function (label) {
24+
return escaper.escapeHtml(label, this.allowedTags);
25+
}
26+
});
27+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<div class="data-grid-cell-content" html="getSafeHtml($col.getLabel($row()))"/>

0 commit comments

Comments
 (0)