mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 08:06:36 +00:00
fix: keep the auto-reply preview from navigating to a data: page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user