Skip to content

Commit

Permalink
[Thumbnails] Escape group text properly
Browse files Browse the repository at this point in the history
  • Loading branch information
dvesh3 committed Jan 19, 2022
1 parent 74cbd22 commit b432225
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bundles/AdminBundle/Controller/Admin/SettingsController.php
Expand Up @@ -1161,7 +1161,7 @@ public function thumbnailTreeAction()
if (empty($groups[$item->getGroup()])) {
$groups[$item->getGroup()] = [
'id' => 'group_' . $item->getName(),
'text' => $item->getGroup(),
'text' => htmlspecialchars($item->getGroup()),
'expandable' => true,
'leaf' => false,
'allowChildren' => true,
Expand Down Expand Up @@ -1388,10 +1388,10 @@ public function videoThumbnailTreeAction()
$groups = [];
foreach ($list->getThumbnails() as $item) {
if ($item->getGroup()) {
if (!$groups[$item->getGroup()]) {
if (empty($groups[$item->getGroup()])) {
$groups[$item->getGroup()] = [
'id' => 'group_' . $item->getName(),
'text' => $item->getGroup(),
'text' => htmlspecialchars($item->getGroup()),
'expandable' => true,
'leaf' => false,
'allowChildren' => true,
Expand Down
Expand Up @@ -82,6 +82,7 @@ pimcore.settings.thumbnail.item = Class.create({
name: "group",
value: this.data.group,
fieldLabel: t("group"),
renderer: Ext.util.Format.htmlEncode,
width: 450
});

Expand Down

0 comments on commit b432225

Please sign in to comment.