aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/viewhtml/sanitize.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/viewhtml/sanitize.go')
-rw-r--r--plugins/viewhtml/sanitize.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/viewhtml/sanitize.go b/plugins/viewhtml/sanitize.go
index a931fe1..ba2aca9 100644
--- a/plugins/viewhtml/sanitize.go
+++ b/plugins/viewhtml/sanitize.go
@@ -71,7 +71,9 @@ var allowedStyles = map[string]bool{
}
type sanitizer struct {
- msg *koushinbase.IMAPMessage
+ msg *koushinbase.IMAPMessage
+ allowRemoteResources bool
+ hasRemoteResources bool
}
func (san *sanitizer) sanitizeImageURL(src string) string {
@@ -94,7 +96,9 @@ func (san *sanitizer) sanitizeImageURL(src string) string {
return part.URL(true).String()
case "https":
- if !proxyEnabled {
+ san.hasRemoteResources = true
+
+ if !proxyEnabled || !san.allowRemoteResources {
return "about:blank"
}