mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): Sanitize HTML binary-data before rendering in the UI (#7400)
This commit is contained in:
committed by
GitHub
parent
47e8953ec9
commit
2b075bfc2d
@@ -112,6 +112,7 @@ export const sleep = async (ms: number): Promise<void> =>
|
||||
|
||||
export function fileTypeFromMimeType(mimeType: string): BinaryFileType | undefined {
|
||||
if (mimeType.startsWith('application/json')) return 'json';
|
||||
if (mimeType.startsWith('text/html')) return 'html';
|
||||
if (mimeType.startsWith('image/')) return 'image';
|
||||
if (mimeType.startsWith('audio/')) return 'audio';
|
||||
if (mimeType.startsWith('video/')) return 'video';
|
||||
|
||||
Reference in New Issue
Block a user