Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: escape command title in command palette (#9539)

01zulfi9145ea423461
diff --git a/apps/web/src/dialogs/command-palette/command-palette-dialog.tsx b/apps/web/src/dialogs/command-palette/command-palette-dialog.tsx
index 891b76dee..e45ebd887 100644
--- a/apps/web/src/dialogs/command-palette/command-palette-dialog.tsx
+++ b/apps/web/src/dialogs/command-palette/command-palette-dialog.tsx
@@ -49,6 +49,7 @@ import {
removeRecentCommand,
addRecentCommand
} from "./commands";
+import { escapeUTF8 } from "entities";
type CommandPaletteDialogProps = BaseDialogProps<boolean> & {
isCommandMode: boolean;
@@ -248,7 +249,7 @@ export const CommandPaletteDialog = DialogManager.register(
>
<Text
variant="subBody"
- dangerouslySetInnerHTML={{ __html: label }}
+ dangerouslySetInnerHTML={{ __html: escapeUTF8(label) }}
/>
</Box>
);
@@ -305,7 +306,7 @@ export const CommandPaletteDialog = DialogManager.register(
overflow: "hidden"
}}
dangerouslySetInnerHTML={{
- __html: command.title
+ __html: escapeUTF8(command.title)
}}
/>
</Flex>