Index: src/FilterEngine.cpp |
=================================================================== |
--- a/src/FilterEngine.cpp |
+++ b/src/FilterEngine.cpp |
@@ -274,14 +274,25 @@ |
std::string lastDocumentUrl = documentUrls.front(); |
for (std::vector<std::string>::const_iterator it = documentUrls.begin(); |
- it != documentUrls.end(); it++) { |
- const std::string documentUrl = *it; |
- AdblockPlus::FilterPtr match = CheckFilterMatch(documentUrl, |
- CONTENT_TYPE_DOCUMENT, |
- lastDocumentUrl); |
+ it != documentUrls.end(); ++it) |
+ { |
+ lastDocumentUrl = *it; |
+ AdblockPlus::FilterPtr match = CheckFilterMatch(url, contentType, |
+ lastDocumentUrl); |
Oleksandr
2014/11/13 13:32:18
I would add a comment before CheckFilterMatch some
sergei
2014/11/13 13:58:13
added
|
if (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION) |
- return match; |
- lastDocumentUrl = documentUrl; |
+ return match; |
+ // We need to start from the same url for the filters like |
+ // @@||example.org^$document, because "document the page itself", so |
+ // we whitelist the everything which is requested by the page example.org. |
Oleksandr
2014/11/13 13:32:18
This comment is confusing, I would remove it.
sergei
2014/11/13 13:58:13
See the updated version. It says ''parent'' but we
|
+ for (std::vector<std::string>::const_iterator ii = it; |
+ ii != documentUrls.end(); ++ii) |
+ { |
+ const std::string& documentUrl = *ii; |
+ AdblockPlus::FilterPtr match = CheckFilterMatch(documentUrl, |
+ CONTENT_TYPE_DOCUMENT, lastDocumentUrl); |
Oleksandr
2014/11/13 13:32:18
Before this CheckFilterMatch I'll add a comment li
sergei
2014/11/13 13:58:13
add before the for loop
|
+ if (match && match->GetType() == AdblockPlus::Filter::TYPE_EXCEPTION) |
+ return match; |
+ } |
} |
return CheckFilterMatch(url, contentType, lastDocumentUrl); |