You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I performed a cursory search of the issue tracker to avoid opening a duplicate issue
Your issue may already be reported.
I tried to reproduce the issue when...
uBlock Origin is the only extension
uBlock Origin with default lists/settings
using a new, unmodified browser profile
I am running the latest version of uBlock Origin
I checked the documentation to understand that the issue I report is not a normal behavior
Description
Clicking link to wiki in my message on Reddit causes wiki to open on top instead of scrolled to "YouTube"/#wiki_youtube section.
This happens because Reddit adds utm_* parameters and I have filter for them:
utm_$queryprune=/^utm_/
Basically if last parameter is removed - hash part is also removed.
This happens because uBO is splitting URL on ? and ignores that hash part is kept in second part of URL and then when last parameter is removed, hash is also removed, because uBO sees it as part of last parameter value. (gibberish? # is passed to URLSearchParams and this function does not understand its special meaning)
There are also two other issues:
When last parameter is not removed, # character is percent-encoded to %23:
Details
Prerequisites
Description
Clicking link to wiki in my message on Reddit causes wiki to open on top instead of scrolled to "YouTube"/
#wiki_youtube
section.This happens because Reddit adds
utm_*
parameters and I have filter for them:Basically if last parameter is removed - hash part is also removed.
This happens because uBO is splitting URL on
?
and ignores that hash part is kept in second part of URL and then when last parameter is removed, hash is also removed, because uBO sees it as part of last parameter value. (gibberish?#
is passed toURLSearchParams
and this function does not understand its special meaning)There are also two other issues:
When last parameter is not removed,
#
character is percent-encoded to%23
:http://example.com/?utm_asdf=2&foo=bar#baz
->http://example.com/?foo=bar%23baz
When last parameter does not have a value,
=
character is appended:http://example.com/?utm_asdf=2&foo#bar
->http://example.com/?foo#bar=
A specific URL where the issue occurs
https://old.reddit.com/r/firefox/comments/khis7a/is_there_any_addon_that_blocks_these_annoying/ggmlioc/
Steps to Reproduce
filterAuthorMode
utm_$queryprune=/^utm_/
Expected behavior:
Wiki scrolled to "YouTube" section.
Actual behavior:
Wiki on top.
Your environment
The text was updated successfully, but these errors were encountered: