/* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com>
*
* This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>.
*
} // Finish processing filter options.
- if (filterListString.isEmpty() && !entryStructPointer->hasRequestOptions) // There are no applied entries and no request options.
+
+ if ((entryStructPointer->originalFilterOptions == QLatin1String("1p")) ||
+ (entryStructPointer->originalFilterOptions == QLatin1String("elemhide")) ||
+ (entryStructPointer->originalFilterOptions == QLatin1String("genericblock")) ||
+ (entryStructPointer->originalFilterOptions == QLatin1String("generichide")) ||
+ (entryStructPointer->originalFilterOptions == QLatin1String("match-case")) ||
+ (entryStructPointer->originalFilterOptions == QLatin1String("xhr"))) // There is a single filter option that Privacy Browser cannot process.
+ {
+ // Ignore entries that contain a single, unsupported filter option. See <https://redmine.stoutner.com/issues/1217>.
+ // `1p` is not an official filter option.
+ // `elemhide` isn't implemented by Privacy Browser.
+ // `genericblock` isn't implemented by Privacy Browser.
+ // `generichide` isn't implemented by Privacy Browser.
+ // `match-case` isn't currently implemented by Privacy Browser, but it could be if that became important.
+ // `xhr` is probably a misspelling of `xmlhttprequest`.
+
+ // Log the dropping of the entry.
+ //qDebug().noquote().nospace() << "Unsupported filter option: " << entryStructPointer->originalEntry << " NOT added from " << filterListFileName << ".";
+ }
+ else if (filterListString.isEmpty() && !entryStructPointer->hasRequestOptions) // There are no applied entries and no request options.
{
// Ignore these entries as they will block all requests generally or for a specified domain. Typically these are left over after removing `csp=` filter options.