Closed cclements closed 10 years ago
While trying to track down the cause of #151, I found a typo which causes this: https://github.com/gorhill/uBlock/commit/cfafce66ca270c1234499ed0525ba09e7aa93485#diff-1
I needed to use querySelector
, not querySelectorAll
. The condition was always evaluated to true
, and the highly generic styles were always injected as a result. The fix was committed as part of the fix of issue #151, and in version 0.3.2.3.
If I load up an xml file in chrome, such as the following url with uBlock installed:
http://digwp.com/xmlrpc.php?rsd
I get the following output. The [onclick^... section looks a bit concerning:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
[onclick^="window.open('http://adultfriendfinder.com/search/"], a[href$="/vghd.shtml"], a[href="/adrotate-out.php?"], [href^=" http://www.drowle.com/"], [href^="http://amzn.to/"] > img[src^="data"], [href^="http://api.taboola.com/"][href="/recommendations.notify-click?app.type="], [href^="http://games.ucoz.ru/"][target="_blank"], a[onmousedown^="this.href='http://paid.outbrain.com/network/redir?key="][target="_blank"], a[onmousedown^="this.href='http://paid.outbrain.com/network/redir?key="][target="_blank"] + .ob_source, a[onmousedown^="this.href='http://staffpicks.outbrain.com/network/redir?key="][target="_blank"], a[onmousedown^="this.href='http://staffpicks.outbrain.com/network/redir?key="][target="_blank"] + .ob_source, div[id^="MarketGid"], div[id^="YFBMSN"], div[id^="acm-ad-tag-"], div[id^="div-gpt-ad-"], iframe[id^="google_adsframe"], iframe[src^="http://ad.yieldmanager.com/"], iframe[src^="http://cdn1.adexprt.com/"], iframe[src^="http://cdn2.adexprt.com/"], img[alt^="Fuckbook"], input[onclick^="window.open('http://www.FriendlyDuck.com/AF"], input[onclick^="window.open('http://www.friendlyduck.com/AF_"], script[src^="http://free-shoutbox.net/app/webroot/shoutbox/sb.php?shoutbox="] + #freeshoutbox_content, div[id^="mainads"], [style="border: 1px solid rgb(0, 90, 136);"], [style="border: 1px solid rgb(145, 117, 77);"], [style="border: 1px solid rgb(241, 250, 248);"], [style="border: 1px solid rgb(51, 102, 153);"], [style="border: 1px solid rgb(51, 102, 204);"] {display:none !important;}