Skip to content

Loading…

Blocked element is not hidden after HTTP redirect #943

Closed
dbdr opened this Issue · 5 comments

2 participants

@dbdr

http://sane.email/ublock-bug.html

The image is correctly blocked, but the element is left visible as a broken image.

@gorhill

The image src is different than what is blocked: there is server-side redirection going on, and uBlock can't match the src with the blocked request:

Image.src = http://li.blogtrottr.com/imp?s=124178&sz=116x15&li=3&m=[...]

Blocked request:

http://p.liadm.com/imp?s=124178&sz=116x15&li=3&m=[...]

ABP exhibits same behavior.

@dbdr dbdr changed the title from Blocked element is not hidden to Blocked element is not hidden after HTTP redirect
@dbdr

Thanks for your analysis. Is there a way this could be made to work?

@gorhill

Yes, there could be a way, but in my opinion it's not worth the code complexity/overhead. If ever this case becomes very common, then I suppose this will have to be done, but currently it's really not common, and I rather not bring complexity/overhead to the code at this point for such a edge case.

@gorhill

Note that there is a workaround: to use the element picker to create a network filter for the URL in the Image.src.

@gorhill

I'm going to close as "by design". Other blockers have same behavior. Work around is to create a custom filter which matches the src of the image, ||li.blogtrottr.com/imp$image in the current case.

@gorhill gorhill closed this
@ahmadassaf ahmadassaf pushed a commit to ahmadassaf/uBlock that referenced this issue
@gorhill gorhill this helps #943 (on linux at least) 32f836d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.