Changes between Initial Version and Version 2 of Ticket #4326
- Timestamp:
- 08/12/2016 01:25:10 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4326
- Property Type changed from change to defect
- Property Blocking changed from to 4321
-
Ticket #4326 – Description
initial v2 1 === Background===2 In issue #4282 we fixed acceptable ads whitelisting for many websites by also matching the www subdomain for Google request exception rules. The abp2blocklist tool should do this automatically in the future. 1 === How to reproduce === 2 Run `echo '||example.com' | node abp2blocklist.js` 3 3 4 === What to change===5 A request exception rule with a `url-filter` property such as:4 === Observed behaviour === 5 Following rule is generated: 6 6 7 `^https?://google\\.com/adsense/search/ads\\.js"` 7 {{{ 8 [ 9 { 10 "trigger": { 11 "url-filter": "^https?://example\\.com", 12 "url-filter-is-case-sensitive": true, 13 "resource-type": [ 14 "image", 15 "style-sheet", 16 "script", 17 "font", 18 "media", 19 "raw", 20 "document" 21 ] 22 }, 23 "action": { 24 "type": "block" 25 } 26 } 27 ] 28 }}} 8 29 9 Should become 30 === Expected behaviour === 31 The `||` token does not only represent the protocol part but also any additional subdomain. So for example in Adblock Plus for Firefox and Chrome, `||example.com` matches any of those: `http://example.com`, `https://www.example.com`, `https://a.b.c.example.com`. 10 32 11 `^https?://(www\\.)?google\\.com/adsense/search/ads\\.js"` 33 Hence the `url-filter` in the resulting rule has to look like `"^https?://([^/]+\\.)?example.com"`. 12 34 13 Update / add test cases accordingly. 14 15 Note: This change should not only be for google.com domains, but rather all request exception rules. 35 === Notes === 36 This bug broke Acceptable Ads on some websites in Adblock Plus for iOS, see #4282 for the related quick fix.