Skip to content

Commit

Permalink
sanitize context menu in admin category list
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Sep 18, 2021
1 parent 1adc96e commit bea7497
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/system/CategoriesModule/Controller/CategoryController.php
Expand Up @@ -98,7 +98,7 @@ private function getNodeOptions(Request $request): array
}
$class = !empty($classes) ? ' class="' . implode(' ', $classes) . '"' : '';

return '<a' . $class . $title . ' href="#">' . $displayName . '</a>';
return '<a' . $class . $title . ' href="#">' . htmlspecialchars($displayName) . '</a>';
}
];
}
Expand All @@ -115,6 +115,6 @@ private function createTitleAttribute(array $node, string $displayName, string $
$title[] = $this->trans('Leaf') . ': ' . ($node['leaf'] ? 'Yes' : 'No');
$title[] = $this->trans('Locked') . ': ' . ($node['locked'] ? 'Yes' : 'No');

return implode('<br />', $title);
return htmlspecialchars(implode('<br />', $title));
}
}

0 comments on commit bea7497

Please sign in to comment.