From 1a1240bda18eeb8e5650cd181f7a785e899632fe Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 26 Nov 2023 16:05:28 +0100 Subject: [PATCH] Explicitly disable JavaScript --- app/src/main/java/eu/faircode/email/FragmentDialogOpenFull.java | 1 + app/src/main/java/eu/faircode/email/WebViewEx.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogOpenFull.java b/app/src/main/java/eu/faircode/email/FragmentDialogOpenFull.java index cab6e87d10..1cb7463740 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogOpenFull.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogOpenFull.java @@ -76,6 +76,7 @@ public class FragmentDialogOpenFull extends FragmentDialogBase { settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING); settings.setAllowFileAccess(false); + settings.setJavaScriptEnabled(false); settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); diff --git a/app/src/main/java/eu/faircode/email/WebViewEx.java b/app/src/main/java/eu/faircode/email/WebViewEx.java index 844d3f4fcf..306a88d839 100644 --- a/app/src/main/java/eu/faircode/email/WebViewEx.java +++ b/app/src/main/java/eu/faircode/email/WebViewEx.java @@ -86,6 +86,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.TEXT_AUTOSIZING); settings.setAllowFileAccess(false); + settings.setJavaScriptEnabled(false); settings.setAllowContentAccess(true); // default settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);