| Index: src/plugin/AdblockPlusClient.cpp |
| diff --git a/src/plugin/AdblockPlusClient.cpp b/src/plugin/AdblockPlusClient.cpp |
| index cafca5124d3fc6c21a24f275cf3eeacb96f28413..89835f659fec94c797ff203d54c45f478a942aa4 100644 |
| --- a/src/plugin/AdblockPlusClient.cpp |
| +++ b/src/plugin/AdblockPlusClient.cpp |
| @@ -261,6 +261,12 @@ bool CAdblockPlusClient::IsElementHidden(const std::wstring& tag, IHTMLElement* |
| bool CAdblockPlusClient::IsWhitelistedUrl(const std::wstring& url) |
| { |
| + std::string filterText; |
| + return IsWhitelistedUrl(url, filterText); |
| +} |
| + |
| +bool CAdblockPlusClient::IsWhitelistedUrl(const std::wstring& url, std::string& filterText) |
| +{ |
| DEBUG_GENERAL((L"IsWhitelistedUrl: " + url + L" start").c_str()); |
| Communication::OutputBuffer request; |
| request << Communication::PROC_IS_WHITELISTED_URL << ToUtf8String(url); |
| @@ -269,11 +275,10 @@ bool CAdblockPlusClient::IsWhitelistedUrl(const std::wstring& url) |
| if (!CallEngine(request, response)) |
| return false; |
| - bool isWhitelisted; |
| - response >> isWhitelisted; |
| + response >> filterText; |
| DEBUG_GENERAL((L"IsWhitelistedUrl: " + url + L" end").c_str()); |
| - return isWhitelisted; |
| + return !filterText.empty(); |
| } |
| bool CAdblockPlusClient::IsElemhideWhitelistedOnDomain(const std::wstring& url) |
| @@ -406,8 +411,13 @@ void CAdblockPlusClient::AddFilter(const std::wstring& text) |
| void CAdblockPlusClient::RemoveFilter(const std::wstring& text) |
| { |
| + RemoveFilter(ToUtf8String(text)); |
| +} |
| + |
| +void CAdblockPlusClient::RemoveFilter(const std::string& text) |
| +{ |
| Communication::OutputBuffer request; |
| - request << Communication::PROC_REMOVE_FILTER << ToUtf8String(text); |
| + request << Communication::PROC_REMOVE_FILTER << text; |
| CallEngine(request); |
| } |