Commit 45fe9c20 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

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

parents 0159818a 33753beb
......@@ -741,6 +741,13 @@ Util::HtmlMessageInfo Util::processHtml(const QString &htmlSource)
}
const int index = startIndex + 6;
messageInfo.extraHead = s.mid(index, endIndex - index);
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 14, 0)
//Remove this hack with https://codereview.qt-project.org/#/c/256100/2 is merged
//Don't authorize to refresh content.
if (MessageViewer::Util::excludeExtraHeader(s)) {
messageInfo.extraHead.clear();
}
#endif
s = s.remove(startIndex, endIndex - startIndex + 7).trimmed();
}
// body
......
......@@ -20,6 +20,7 @@
#include "blockexternalresourcesurlinterceptor.h"
#include <QWebEngineUrlRequestInfo>
#include <qtwebenginewidgetsversion.h>
using namespace MessageViewer;
......@@ -65,7 +66,10 @@ bool BlockExternalResourcesUrlInterceptor::interceptRequest(QWebEngineUrlRequest
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeTyped
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeBackForward
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeOther
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeRedirect) {
#if QTWEBENGINEWIDGETS_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|| navigationType == QWebEngineUrlRequestInfo::NavigationTypeRedirect
#endif
) {
return true;
}
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