Fix percent encoding in enclosures.

This commit is contained in:
Martin Rotter 2020-08-14 08:06:32 +02:00
parent f95ab32e24
commit 04559c5b09
2 changed files with 7 additions and 0 deletions

View File

@ -108,6 +108,8 @@ void WebViewer::loadMessages(const QList<Message>& messages, RootItem* root) {
enc_url = enclosure.m_url;
}
enc_url = QUrl::fromPercentEncoding(enc_url.toUtf8());
enclosures += skin.m_enclosureMarkup.arg(enc_url,
tr("Attachment"), enclosure.m_mimeType);

View File

@ -83,7 +83,12 @@ Application::Application(const QString& id, int& argc, char** argv)
connect(QWebEngineProfile::defaultProfile(), &QWebEngineProfile::downloadRequested, this, &Application::downloadRequested);
#if QT_VERSION >= 0x050D00 // Qt >= 5.13.0
QWebEngineProfile::defaultProfile()->setUrlRequestInterceptor(m_urlInterceptor);
#else
QWebEngineProfile::defaultProfile()->setRequestInterceptor(m_urlInterceptor);
#endif
m_urlInterceptor->loadSettings();
QWebEngineProfile::defaultProfile()->installUrlSchemeHandler(QByteArray(APP_LOW_NAME),