The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Worker results: an SVG's start is matched without a literal byte order mark
Adarsh425b2f4dd6e7
diff --git a/src/server/computer/http.ts b/src/server/computer/http.tsindex 2c14ab22..56af44d6 100644--- a/src/server/computer/http.ts+++ b/src/server/computer/http.ts@@ -105,8 +105,8 @@ const KIND_WORDS: Record<WantedFile["kind"], string> = { image: "a picture", vidconst notWhatWasAsked = (w: WantedFile) => `Couldn't save a result from your ComfyUI: it isn't ${KIND_WORDS[w.kind] ?? "what this run makes"}.`;-/** An SVG's first bytes: a byte order mark and white space, then its XML declaration, a comment or its <svg> tag. */-const SVG_HEAD = /^?\s*(<\?xml[\s?]|<!--|<svg[\s>/])/;+/** An SVG's first bytes: white space (a byte order mark is one), then its XML declaration, a comment or its <svg> tag. */+const SVG_HEAD = /^\s*(<\?xml[\s?]|<!--|<svg[\s>/])/;/** What a kept SVG never holds: scripts, event handlers, a page inside it, entities. */const SVG_ACTIVE = /<script\b|<foreignObject\b|<!ENTITY|\son[a-z]+\s*=|javascript:/i;const SVG_MAX_BYTES = 64 * 2 ** 20;