fix: keep the auto-reply preview from navigating to a data: page

This commit is contained in:
Linus Rath
2026-10-29 04:45:35 +01:00
parent ddec876e36
commit 4e3da668f4
+2 -1
View File
@@ -18,6 +18,7 @@ import { ownDomains } from '../../lib/sieve/vacation-audience';
import type { VacationForward } from '../../lib/sieve/types';
import { htmlToPlainText } from '../../lib/compose-html';
import { stripDangerousTags, escapeHtml } from '../../lib/email-html';
import { isEditorNavigationAllowed } from '../../lib/editor-html';
import {
isValidLocalInput,
localInputToUtcIso,
@@ -411,7 +412,7 @@ export function VacationSettings() {
scrollEnabled={false}
javaScriptEnabled={false}
// Links in the preview must not navigate the WebView away.
onShouldStartLoadWithRequest={(req) => req.url === 'about:blank' || req.url.startsWith('data:')}
onShouldStartLoadWithRequest={(req) => isEditorNavigationAllowed(req.url)}
/>
) : (
<Text style={styles.previewBody}>{body}</Text>