The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 14:45 UTC
fix(web): OpenDocument slide previews no longer print speaker notes (#33294)
Co-authored-by: Geezy <igor.licko@gloryck.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>
TheGuyWithHAT committed
Nov 14, 2026 at 17:03 UTC
776698a3e7ecfb8c6e60e13e51361f9d7c5324da
2 files changed
+4
-1
apps/web/src/components/files/FilePreviewPanel.test.ts
+2
-1
@@ -457,12 +457,13 @@ Third}`;
457
it.each(["odt", "odp"] as const)("reads %s text and rejects XML entities", async (kind) => {
458
const archive = new JSZip().file(
459
"content.xml",
460
- `<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"><office:body>${kind === "odt" ? "<office:text><text:p>Field notes</text:p></office:text>" : '<draw:page draw:name="Overview"><text:h>Launch plan</text:h></draw:page>'}</office:body></office:document-content>`,
460
+ `<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"><office:body>${kind === "odt" ? "<office:text><text:p>Field notes</text:p></office:text>" : '<draw:page draw:name="Overview"><text:h>Launch plan</text:h><presentation:notes><draw:frame><draw:text-box><text:p>Speaker only</text:p></draw:text-box></draw:frame></presentation:notes></draw:page>'}</office:body></office:document-content>`,
461
);
462
const result = await openDocument(archive, kind);
463
expect(result.type).toBe("document");
464
if (result.type !== "document") throw new Error("Expected document");
465
expect(result.pages[0]!.html).toContain(kind === "odt" ? "Field notes" : "Launch plan");
466
+ expect(result.pages[0]!.html).not.toContain("Speaker only");
467
archive.file(
468
"content.xml",
469
'<!DOCTYPE x [<!ENTITY external SYSTEM "file:///etc/passwd">]><x>&external;</x>',
apps/web/src/components/files/extendedDocumentPreview.ts
+2
@@ -28,6 +28,7 @@ const namespacePrefixes: Record<string, string> = {
28
"urn:oasis:names:tc:opendocument:xmlns:table:1.0": "table",
29
"urn:oasis:names:tc:opendocument:xmlns:text:1.0": "text",
30
"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0": "draw",
31
+ "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0": "presentation",
32
"http://www.w3.org/1999/xlink": "xlink",
33
"http://www.w3.org/1999/xhtml": "",
34
"http://www.idpf.org/2007/opf": "",
@@ -275,6 +276,7 @@ async function odfHtml(node: XmlNode, archive: JSZip): Promise<string> {
276
if (
277
[
278
"office:annotation",
279
+ "presentation:notes",
280
"text:tracked-changes",
281
"office:scripts",
282
"draw:object",