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

Exclude cid file too

parent 19f78a52
......@@ -18,6 +18,7 @@
#include "loadexternalreferencesurlinterceptor.h"
#include <QWebEngineUrlRequestInfo>
#include <QDebug>
using namespace MessageViewer;
......@@ -47,7 +48,7 @@ LoadExternalReferencesUrlInterceptor::~LoadExternalReferencesUrlInterceptor()
bool LoadExternalReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
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;
} else if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMedia) {
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