Skip to content

Commit bdf8a35

Browse files
committed
MAGETWO-37525: Page and Block titles not escaped properly
- Cell in general escape output (via binding 'text:'). - Added exception for *select* fields: their output contains markup, but new markup cannot be setted by Admin user.
1 parent 589fc15 commit bdf8a35

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_listing.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,10 @@
373373
<column name="store_id" class="Magento\Store\Ui\Component\Listing\Column\Store">
374374
<argument name="data" xsi:type="array">
375375
<item name="js_config" xsi:type="array">
376-
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/sortable</item>
376+
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
377377
</item>
378378
<item name="config" xsi:type="array">
379+
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
379380
<item name="sortable" xsi:type="boolean">false</item>
380381
<item name="dataType" xsi:type="string">text</item>
381382
<item name="align" xsi:type="string">left</item>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<td
8+
data-bind="visible: visible,
9+
click: isClickable(row) ? redirect.bind($data, getClickUrl(row)) : false,
10+
html: getLabel(row[field.index])"
11+
data-action="grid-row-edit"></td>

app/code/Magento/Ui/view/base/web/templates/grid/cells/text.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
8-
<!-- ko if: isClickable(row) -->
97
<td
10-
class="_clickable"
11-
data-bind="click: redirect.bind($data, getClickUrl(row)),
12-
visible: visible,
13-
html: getLabel(row[field.index])"
14-
data-action="grid-row-edit"></td>
15-
<!-- /ko -->
16-
<!-- ko ifnot: isClickable(row) -->
17-
<td data-bind="visible: visible, html: getLabel(row[field.index])"></td>
18-
<!-- /ko -->
8+
data-bind="visible: visible,
9+
click: isClickable(row) ? redirect.bind($data, getClickUrl(row)) : false,
10+
text: getLabel(row[field.index])"
11+
data-action="grid-row-edit"></td>

0 commit comments

Comments
 (0)