open-webui/src/lib/components/common
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
..
RichTextInput perf: stop scanning every socket.io payload for binary data (#28180) 2026-08-31 01:22:06 -04:00
Tags refac 2026-08-10 18:52:18 -06:00
Valves feat: Dynamically load leaflet to improve first-screen loading speed 2025-09-17 08:20:56 +00:00
AccessButton.svelte refac 2026-08-20 12:56:45 -07:00
Badge.svelte refac 2026-08-10 18:52:18 -06:00
Banner.svelte refac 2026-09-04 18:31:59 -04:00
ChatList.svelte refac 2026-07-14 04:15:20 -04:00
Checkbox.svelte refac 2026-08-12 00:51:12 -06:00
CodeEditor.svelte fix: install black's transitive deps in the pyodide code formatter (#29503) 2026-09-04 00:45:58 -04:00
CodeEditorModal.svelte refac 2026-09-03 20:22:32 -04:00
Collapsible.svelte refac 2026-08-10 23:37:45 -06:00
ConfirmDialog.svelte fix: expose ConfirmDialog with dialog role and label its input (WCAG 4.1.2, 3.3.2) (#26769) 2026-07-27 01:15:12 -04:00
DocxPreview.svelte fix: skip embedded HTML parts and restrict link targets in docx preview (#29699) 2026-09-06 16:40:01 -04:00
DragGhost.svelte refac 2026-03-22 22:01:38 -05:00
Drawer.svelte fix: render code editor drawer above settings modal (#27648) 2026-08-23 13:44:41 -04:00
Dropdown.svelte refac 2026-07-27 03:59:12 -04:00
DropdownMenu.svelte refac 2026-08-31 01:37:36 -04:00
DropdownOptions.svelte refac 2026-08-10 18:52:18 -06:00
DropdownSub.svelte refac 2026-08-31 01:37:36 -04:00
Emoji.svelte enh: emoji folder icon 2025-09-04 02:50:50 +04:00
EmojiPicker.svelte refac 2026-08-10 18:52:18 -06:00
ExperimentalBadge.svelte refac 2026-08-13 19:59:11 -06:00
FileItem.svelte refac 2026-08-22 08:21:53 -04:00
FileItemModal.svelte refac 2026-09-03 20:22:32 -04:00
Folder.svelte a11y 2026-08-11 01:25:20 -06:00
FullHeightIframe.svelte Merge pull request #26914 from Classic298/srcdoc-embed-prompt-confirmation 2026-07-10 13:28:39 -05:00
HotkeyHint.svelte feat: add setting to toggle keyboard shortcuts on/off (#27300) 2026-07-23 22:14:56 -04:00
Image.svelte refac 2026-08-13 02:03:13 -06:00
ImagePreview.svelte refac 2026-08-23 13:47:02 -04:00
InputModal.svelte refac 2026-09-03 20:22:32 -04:00
InterfaceSettings.svelte refac 2026-08-30 12:36:16 -04:00
LanguageModeSelect.svelte refac 2026-09-04 18:31:59 -04:00
Loader.svelte fix: message delete issue 2025-06-02 23:25:38 +04:00
LocalizedField.svelte refac 2026-09-04 23:34:32 -04:00
Marquee.svelte feat: onboarding screen 2024-11-03 03:00:28 -08:00
MobileSwipePanel.svelte refac 2026-08-30 21:41:03 -04:00
Modal.svelte fix: restore per-item retrieval settings in the model editor knowledge section (#27686) 2026-08-24 07:34:30 -04:00
MultiSelect.svelte refac 2026-08-12 00:51:12 -06:00
NativeSelect.svelte refac 2026-06-29 05:14:03 -05:00
Overlay.svelte refac 2026-07-14 04:15:20 -04:00
Pagination.svelte refac 2026-08-10 18:52:18 -06:00
PanzoomContainer.svelte refac 2026-08-15 01:09:39 -06:00
PdfPagesPreview.svelte refac 2026-08-27 16:41:43 -04:00
PDFViewer.svelte refac 2026-09-03 20:22:32 -04:00
PptxPreview.svelte refac 2026-09-03 20:22:32 -04:00
ResizableSidePanel.svelte refac 2026-09-03 20:22:32 -04:00
RichTextInput.svelte refac 2026-08-24 21:15:54 -04:00
Select.svelte fix: keep select dropdowns inside the viewport (#29226) 2026-08-30 12:06:27 -04:00
Selector.svelte refac 2026-07-14 04:15:20 -04:00
SensitiveInput.svelte fix: give SensitiveInput a unique default id (WCAG 1.3.1, 4.1.2) (#27488) 2026-07-26 17:37:45 -04:00
SettingsSelect.svelte refac 2026-07-15 18:26:29 -04:00
Sidebar.svelte refac: styling 2025-01-17 17:03:25 -08:00
SlideShow.svelte chore: streamline the URL used for resources like favicon.png 2025-07-09 09:14:51 +02:00
Spinner.svelte refac: styling 2025-06-27 16:15:16 +04:00
SplitCreateButton.svelte refac 2026-08-12 00:51:12 -06:00
SVGPanZoom.svelte refactor(SVGPanZoom): Fix memory leaking - consolidate zoom lifecycle into PanzoomContainer (#23236) 2026-03-30 20:54:28 -05:00
Switch.svelte refac 2026-08-12 00:51:12 -06:00
Tags.svelte refac 2026-08-10 18:52:18 -06:00
Textarea.svelte refac 2026-07-26 17:51:49 -04:00
ToolCallDisplay.svelte refac 2026-08-23 02:34:08 -04:00
Tooltip.svelte fix: Fix Tooltip memory leaking and type define (#21969) 2026-02-28 14:01:28 -05:00
TranslationTable.svelte refac 2026-09-04 18:31:59 -04:00
Valves.svelte refac 2026-09-04 18:31:59 -04:00