Skip to content

Commit 483a62f

Browse files
committed
more
1 parent ae48944 commit 483a62f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

services/static-webserver/client/source/class/osparc/file/FolderContent.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,21 @@ qx.Class.define("osparc.file.FolderContent", {
6767
height: 80,
6868
padding: 2
6969
});
70-
item.getChildControl("label").set({
70+
const toggleLabel = item.getChildControl("label");
71+
toggleLabel.set({
7172
font: "text-12",
7273
rich: true,
7374
textAlign: "center",
7475
maxWidth: 100,
7576
maxHeight: 33 // two lines
7677
});
78+
toggleLabel.addListener("changeValue", e => {
79+
const val = e.getData();
80+
const sanitized = osparc.wrapper.DOMPurify.sanitize(val);
81+
if (sanitized !== val) {
82+
toggleLabel.setValue(sanitized);
83+
}
84+
});
7785
osparc.utils.Utils.setIdToWidget(item, "FolderViewerItem");
7886
return item;
7987
},

0 commit comments

Comments
 (0)