Skip to content

Commit

Permalink
[Asset] Custom Metadata: properly escape values in grid
Browse files Browse the repository at this point in the history
  • Loading branch information
brusch committed Aug 25, 2021
1 parent af229c0 commit 79a5757
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -113,7 +113,8 @@ pimcore.asset.metadata.tags.date = Class.create(pimcore.asset.metadata.tags.abst
}
return Ext.Date.format(value, "Y-m-d");
}
return value;

return Ext.util.Format.htmlEncode(value);
},

marshal: function(value) {
Expand Down
Expand Up @@ -251,7 +251,7 @@ pimcore.asset.metadata.tags.manyToOneRelation = Class.create(pimcore.asset.metad

getGridCellRenderer: function(value, metaData, record, rowIndex, colIndex, store) {
if (value) {
value = nl2br(value);
value = nl2br(Ext.util.Format.htmlEncode(value));
} else {
value = "";
}
Expand Down
Expand Up @@ -107,7 +107,7 @@ pimcore.asset.metadata.tags.textarea = Class.create(pimcore.asset.metadata.tags.

getGridCellRenderer: function(value, metaData, record, rowIndex, colIndex, store) {
if (value) {
return nl2br(value);
return nl2br(Ext.util.Format.htmlEncode(value));
} else {
return "";
}
Expand Down

0 comments on commit 79a5757

Please sign in to comment.