Commit Graph
16 Commits
Author SHA1 Message Date
Timothy Jaeryang Baek c3747e8449 refac 2026-11-23 15:06:29 +04:00
Timothy Jaeryang Baek a78a66e7de refac 2026-11-21 13:27:07 +04:00
Timothy Jaeryang Baek 76339161b0 refac 2026-11-20 14:43:49 +04:00
Timothy Jaeryang Baek 5d868f91ac refac 2026-11-08 11:06:22 +09:00
Timothy Jaeryang Baek b1d3cb4a3b chore: format 2026-10-16 15:20:01 +04:00
Timothy Jaeryang Baek ba0b2169e1 refac 2026-10-16 03:13:13 +04:00
Timothy Jaeryang Baek 7d205a86dc refac 2026-10-08 23:49:38 +04:00
Classic298 7fc979f95b fix: skip embedded HTML parts and restrict link targets in docx preview (#29699)
* fix: skip embedded HTML parts in docx preview

The docx preview no longer renders altChunk parts, so an embedded HTML sub-document is omitted from the rendered output instead of being handed to the renderer.

* fix: restrict docx preview link targets to safe schemes

The docx preview kept whatever link target the document supplied, so a document could point a link at any scheme the browser understands.

After rendering, a link target is now kept only when it resolves to http, https, mailto or tel. Anything else has its target removed and the link renders as plain text. Targets resolve against the page URL, so internal bookmark links and relative targets are unaffected, while an empty target, which the renderer emits for a hyperlink with no external relationship, is dropped instead of reloading the app.

DOMPurify was not used because running it over the rendered document would strip the renderer's own markup and styling, so the check stays limited to link targets. Links using file: or Office application schemes no longer resolve.
2026-09-06 16:40:01 -04:00
Timothy Jaeryang Baek f677fdbf50 refac 2026-09-03 20:22:32 -04:00
Timothy Jaeryang Baek fd8cc2ba4a refac 2026-08-24 18:06:59 -04:00
Timothy Jaeryang Baek d4461bd6f3 refac 2026-08-10 18:52:18 -06:00
Timothy Jaeryang Baek 060648f939 refac 2026-08-10 01:36:09 -06:00
Timothy Jaeryang Baek f9cd49443c refac 2026-08-10 01:32:29 -06:00
Timothy Jaeryang Baek 4e69166017 refac 2026-08-10 01:32:11 -06:00
Timothy Jaeryang Baek 048c063993 refac 2026-08-10 01:26:04 -06:00
Timothy Jaeryang Baek ff7467b4c5 refac 2026-08-10 01:14:53 -06:00