AdguardTeam / FiltersCompiler

A tool that compiles & validates filters
GNU Lesser General Public License v3.0
52 stars 12 forks source link

Add a validation for :has() #88

Closed zloyden closed 4 years ago

zloyden commented 4 years ago

Please add a validation which will not allow you to add to Filters incorrect rules like these

gismeteo.by,gismeteo.md#?#.content > div[class] > div[class] > div[class] > div[class] > div[class] > div[class]:has(> div#printWeather) + div[class]
gismeteo.by,gismeteo.md#?#.content > div[class] > div[class] > div[class] > div[class] > div[class]:has(> div.weather_month) + div[class]
gismeteo.by#?#.content > div[class] > div[class] > div[class] > div[class] > div[class]:has(> div#map-container) + div[class]

) was missed in :has() <- here

https://github.com/AdguardTeam/AdguardFilters/commit/794ece0a1e209e5c492b962154749275f855af0c

Alex-302 commented 4 years ago

not for ExtCSS only - for all brackets (), {}, [], <>

zloyden commented 4 years ago

Nevermind, they aren't incorrect rules.