Opened 2 years ago

Closed 2 years ago

#6950 closed change (fixed)

[python-abp] Don't include headers and metadata from includes into output

Reported by: sebastian Assignee: sebastian
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: kvas Blocked By:
Blocking: #6877 Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by sebastian)


Since #6920 we only consider metadata at the top of the filter list. However, python-abp parses each input file separately. So metadata given at the top of an included file would be considered, while Adblock Plus won't consider those metadata if they are not at the top of the resulting filter list.

This is mostly relevant when bundling pre-generated filter lists with. However, in that case we would want to provide explicit metadata for the bundled list. So it seems most appropriate (and also simplest) to strip any metadata and headers given in included files.

However, since we still allow comments (and consider metadata with malformed keys like Last modified as comments), we might want to change these semantics as well.

What to change

  • Strip headers and metadatas from included files.
  • Consider any comment whose text has a colon as metadata.
  • Stop removing duplicate headers and metadata (this is no longer necessary since we don't include headers and metadata from included files anymore).

Change History (4)

comment:1 Changed 2 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 2 years ago by sebastian

  • Description modified (diff)

comment:3 Changed 2 years ago by abpbot

comment:4 Changed 2 years ago by sebastian

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.