mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
AdBlock + GreaseMonkey: Fixed downloading UTF-8 subscriptions / scripts
This commit is contained in:
parent
f65b30fda7
commit
f70d77a413
@ -155,7 +155,7 @@ void AdBlockSubscription::subscriptionDownloaded()
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray response = m_reply->readAll();
|
||||
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
|
||||
|
||||
if (m_reply->error() == QNetworkReply::NoError && response.startsWith("[Adblock")) {
|
||||
// Prepend subscription info
|
||||
|
@ -52,7 +52,7 @@ void GM_Downloader::scriptDownloaded()
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray response = m_reply->readAll();
|
||||
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
|
||||
|
||||
if (m_reply->error() == QNetworkReply::NoError && response.contains("// ==UserScript==")) {
|
||||
const QString &filePath = m_manager->scriptsDirectory() + qz_getFileNameFromUrl(m_reply->url());
|
||||
@ -97,7 +97,7 @@ void GM_Downloader::requireDownloaded()
|
||||
return;
|
||||
}
|
||||
|
||||
QByteArray response = m_reply->readAll();
|
||||
QByteArray response = QString::fromUtf8(m_reply->readAll()).toUtf8();
|
||||
|
||||
if (m_reply->error() == QNetworkReply::NoError && !response.isEmpty()) {
|
||||
const QString &filePath = m_manager->settinsPath() + "/greasemonkey/requires/require.js";
|
||||
|
Loading…
Reference in New Issue
Block a user