fix(editor): Sanitize HTML binary-data before rendering in the UI (#7400)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-11 12:09:19 +02:00
committed by GitHub
parent 47e8953ec9
commit 2b075bfc2d
7 changed files with 31 additions and 21 deletions

View File

@@ -347,7 +347,7 @@
</Suspense>
<Suspense v-else-if="hasNodeRun && isPaneTypeOutput && displayMode === 'html'">
<run-data-html :inputData="inputData" />
<run-data-html :inputHtml="inputData[0].json.html" />
</Suspense>
<Suspense v-else-if="hasNodeRun && isSchemaView">
@@ -1320,7 +1320,9 @@ export default defineComponent({
},
isViewable(index: number, key: string): boolean {
const { fileType } = this.binaryData[index][key];
return !!fileType && ['image', 'audio', 'video', 'text', 'json', 'pdf'].includes(fileType);
return (
!!fileType && ['image', 'audio', 'video', 'text', 'json', 'pdf', 'html'].includes(fileType)
);
},
isDownloadable(index: number, key: string): boolean {
const { mimeType, fileName } = this.binaryData[index][key];