Skip to content

URL contains extra slash while matching against filters and some rules are not applied #1338

@AdamWr

Description

@AdamWr

Steps to reproduce:

  1. Add these rules:
||example.org^$replace=/<h1>[\s\S]*?<\/h1>/<script src="path\/thisistest\/adv\.js"><\/script>/
/thisistest/*$domain=example.org
@@||example.org/path/thisistest/adv.js
  1. Go here - http://example.org/

Expected behavior

Request/script example.org/path/thisistest/adv.js shouldn't be blocked.

Actual behavior

It seems that request/script is removed, because there is added additional slash and it looks like that:
http://example.org//path/thisistest/adv.js

Screenshot when request is not blocked

image

Screenshot when request/script is blocked/removed

image

Additionally, I'm not sure if it's a bug, but it seems that exception with $content modifier disable $replace rules as well:
@@||example.org^$content

Your environment

  • AdGuard for Windows 7.5 nightly 25 (build 3382, CL 1.7.64)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions