A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/uBlockOrigin/uBlock-issues/issues/805 below:

Source list of entity filter with subdomain is not looked up correctly · Issue #805 · uBlockOrigin/uBlock-issues · GitHub

Details Prerequisites Description

Logger details view for www.example.*##p shows "Static filter ##p could not be found in any of the currently enabled filter lists"

@okiehsch found it here: uBlockOrigin/uAssets#6637 (comment)

This started with gorhill/uBlock@a73dd0a and obviously before this commit scriptlet is not even logged.

reEntity, ^gmx\.\*$ does not match www.gmx.com in reverselookup-worker.js, hostnameMatches function.

A specific URL where the issue occurs Steps to Reproduce
  1. add www.example.*##p to My filters
  2. open logger
  3. open http://www.example.com/
  4. click on p entry in the logger
Expected behavior:

Filter list
My filters

Actual behavior:

Filter list
Static filter ##p could not be found in any of the currently enabled filter lists

Your environment

This seems to work:

diff --git a/src/js/reverselookup-worker.js b/src/js/reverselookup-worker.js
index eb12ccea..3042e5fc 100644
--- a/src/js/reverselookup-worker.js
+++ b/src/js/reverselookup-worker.js
@@ -141,8 +141,8 @@ const fromCosmeticFilter = function(details) {
     );
 
     let reEntity,
-        domain = details.domain,
-        pos = domain.indexOf('.');
+        domain = details.hostname,
+        pos = domain.lastIndexOf('.');
     if ( pos !== -1 ) {
         reEntity = new RegExp(
             '^' +

Marek33, ghajini and liamengland1


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4