3 ms·
A few days ago [1], I found this filter for UBlock Origin to be working for me so far: facebook.com##[id^=hyperfeed_story_id_]:has([id*=feed_sub_title_]):h
by mholt 8y ago
A few days ago [1], I found this filter for UBlock Origin to be working for me so far:
facebook.com##[id^=hyperfeed_story_id_]:has([id*=feed_sub_title_]):has(span:has-text(/S.*p.*o.*n.*s.*o.*r.*e.*d/))
GitHub issue: https://github.com/uBlockOrigin/uAssets/issues/3367 https://github.com/uBlockOrigin/uAssets/issues/3367
[1]: https://twitter.com/mholt6/status/1092191140168622080 https://twitter.com/mholt6/status/1092191140168622080
- testplzignore 8y agoIf I worked at Facebook and was evil, I'd put some text in that span that caused catastrophic backtracking :)
- majewsky 8y agoRegexes can be evaluated in linear time, so you'd have to send gigabytes worth of text to cause any noticeable slowdown.
- MapleWalnut 8y agoI believe with lookahead/behind a regex is technically not "regular" anymore, so you can definitely DoS a regex without GB worth of text.
- saagarjha 8y agoSure, but that regex doesn't have lookahead/lookbehind?