Commit ebff1af0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Merge remote-tracking branch 'origin/release/20.04'

parents f24e4193 249c0301
Pipeline #21585 passed with stage
in 52 minutes and 54 seconds
......@@ -37,10 +37,12 @@ bool CidReferencesUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &inf
{
const QUrl urlRequestUrl(info.requestUrl());
if (urlRequestUrl.scheme() == QLatin1String("cid")) {
const QString newUrl = MessageViewer::WebEngineEmbedPart::self()->contentUrl(
urlRequestUrl.path());
if (!newUrl.isEmpty()) {
info.redirect(QUrl(newUrl));
if (info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage) {
const QString newUrl = MessageViewer::WebEngineEmbedPart::self()->contentUrl(
urlRequestUrl.path());
if (!newUrl.isEmpty()) {
info.redirect(QUrl(newUrl));
}
}
}
return false;
......
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