adblockparser icon indicating copy to clipboard operation
adblockparser copied to clipboard

Fix option splitting on regex rules with end of line

Open jgkamat opened this issue 5 years ago • 0 comments

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.

See this snippet for ubo's implementation

jgkamat avatar Feb 20 '19 02:02 jgkamat