Opened 23 months ago

Last modified 20 months ago

#6690 closed defect

Trailing periods are not treated consistently between filter types — at Version 3

Reported by: kzar Assignee:
Priority: P3 Milestone:
Module: Core Keywords:
Cc: mjethani, sergz, sebastian, greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29790629/

Description (last modified by kzar)

Environment

adblockpluschrome built from 939bf6cdd435. Chrome 66.

How to reproduce

  1. Append this code to the end of adblockpluschrome/adblockpluscore/lib/filterClasses.js:
console.log(Filter.fromText("com.###id").domains);
console.log(Filter.fromText("foo$domain=com.").domains);
  1. Have a look in the console at the logged domains.

Observed behaviour

The element hiding filter has the domain "com." (with the trailing period), where as the blocking filter has the domain "com"

Expected behaviour

The trailing period would be treated consitently for element hiding and blocking filters.

Notes

  • This has some implications on our code that needs to know if filter domains can ever have trailing dots. See the discussion in this codereview for example.
  • Our users have asked in the past that filters for the domain without the trailing dot should apply to requests to the domain with the trailing dot. See #4302.

Change History (3)

comment:1 Changed 23 months ago by kzar

  • Blocking 6091 removed

On second thoughts this isn't really blocking #6091 unless we decide the trailing dot should always be stripped.

comment:2 Changed 23 months ago by kzar

  • Description modified (diff)

comment:3 Changed 23 months ago by kzar

  • Description modified (diff)
Note: See TracTickets for help on using tickets.