mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 16:06:32 +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 type { VacationForward } from '../../lib/sieve/types';
|
||||||
import { htmlToPlainText } from '../../lib/compose-html';
|
import { htmlToPlainText } from '../../lib/compose-html';
|
||||||
import { stripDangerousTags, escapeHtml } from '../../lib/email-html';
|
import { stripDangerousTags, escapeHtml } from '../../lib/email-html';
|
||||||
|
import { isEditorNavigationAllowed } from '../../lib/editor-html';
|
||||||
import {
|
import {
|
||||||
isValidLocalInput,
|
isValidLocalInput,
|
||||||
localInputToUtcIso,
|
localInputToUtcIso,
|
||||||
@@ -411,7 +412,7 @@ export function VacationSettings() {
|
|||||||
scrollEnabled={false}
|
scrollEnabled={false}
|
||||||
javaScriptEnabled={false}
|
javaScriptEnabled={false}
|
||||||
// Links in the preview must not navigate the WebView away.
|
// 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>
|
<Text style={styles.previewBody}>{body}</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user