Index: lib/devtools.js |
=================================================================== |
--- a/lib/devtools.js |
+++ b/lib/devtools.js |
@@ -80,17 +80,23 @@ |
// Ignore partial (e.g. ELEMHIDE) whitelisting if there is already |
// a DOCUMENT exception which disables all means of blocking. |
(record.request.type == "DOCUMENT" ? |
nonRequestTypes.includes(request.type) : |
record.request.type == request.type) && |
// Matched element hiding filters don't relate to a particular request, |
// so we have to compare the selector in order to avoid duplicates. |
- (record.filter && record.filter.selector) == (filter && filter.selector) |
+ (record.filter && record.filter.selector) == (filter && filter.selector) && |
+ |
+ // We apply multiple CSP filters to a document, but we must still remove |
+ // any duplicates. Two CSP filters are duplicates if both have identical |
+ // text. |
+ (record.filter && record.filter.csp && record.filter.text) == |
+ (filter && filter.csp && filter.text) |
); |
} |
function addRecord(panel, request, filter) |
{ |
if (!hasRecord(panel, request, filter)) |
{ |
panel.port.postMessage({ |