Change formatting to prevent UI redressing attacks (#17611)

This commit is contained in:
Tommaso Sciortino
2026-01-27 08:56:01 -08:00
committed by GitHub
parent 6be42be575
commit 8b2b71c8ef
6 changed files with 26 additions and 24 deletions
@@ -9,7 +9,7 @@ import { theme } from '../semantic-colors.js';
import { ExpandableText, MAX_WIDTH } from './shared/ExpandableText.js';
import { CommandKind } from '../commands/types.js';
import { Colors } from '../colors.js';
import { sanitizeForListDisplay } from '../utils/textUtils.js';
import { sanitizeForDisplay } from '../utils/textUtils.js';
export interface Suggestion {
label: string;
@@ -117,7 +117,7 @@ export function SuggestionsDisplay({
{suggestion.description && (
<Box flexGrow={1} paddingLeft={3}>
<Text color={textColor} wrap="truncate">
{sanitizeForListDisplay(suggestion.description, 100)}
{sanitizeForDisplay(suggestion.description, 100)}
</Text>
</Box>
)}