Commit 1a21862c authored by Laurent Montel's avatar Laurent Montel 😁

Exclude cid file too

parent 19f78a52
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "loadexternalreferencesurlinterceptor.h" #include "loadexternalreferencesurlinterceptor.h"
#include <QWebEngineUrlRequestInfo> #include <QWebEngineUrlRequestInfo>
#include <QDebug>
using namespace MessageViewer; using namespace MessageViewer;
...@@ -47,7 +48,7 @@ LoadExternalReferencesUrlInterceptor::~LoadExternalReferencesUrlInterceptor() ...@@ -47,7 +48,7 @@ LoadExternalReferencesUrlInterceptor::~LoadExternalReferencesUrlInterceptor()
bool LoadExternalReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) bool LoadExternalReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{ {
if (!d->mAllowLoadExternalReference) { if (!d->mAllowLoadExternalReference) {
if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage && !info.requestUrl().isLocalFile()) { if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage && !info.requestUrl().isLocalFile() && (info.requestUrl().scheme() != QLatin1String("cid"))) {
return true; return true;
} else if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMedia) { } else if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMedia) {
return true; return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment