adblockparser
adblockparser copied to clipboard
Fix option splitting on regex rules with end of line
While doing more extensive testing on my fork, I found a small bug.
On the rule:
/\.accountant\/[0-9]{2,9}\/$/$script,stylesheet,third-party,xmlhttprequest
taken from easylist, you split on the first $
, then strip the left and right /
, which leaves \
at the end (which is an invalid regexp). It happens to not error out during regex compilation because it is followed by a |
(I think), which can be properly escaped.