Closed cantunborn closed 4 months ago
Just found a special case where href-sanitizer
fails to work.
Steps to reproduce:
www.google.*##+js(href-sanitizer, #main a[href^="/url?q=http"], ?q)
no-scripting: www.google.com true
And there is SecurityError: The operation is insecure.
(
function(name) {
if ( self.uBO_bcSecret ) { return; }
const bcSecret = new self.BroadcastChannel(name); // SecurityError: The operation is insecure.
If cookies are allowed, it works just fine under no-scripting mode.
href-sanitizer
won't work on desktop. I only set it on mobile
Sorry for the confusion. I added it manually it without any condition, and it does work on desktop. When scripting is disabled for google, it shows the same page as on mobile.
How to truncate URLs like these in Google images?
https://www.google.com/search?q=germ+warfare#vhid=gaG-tD5eCpYK3M&vssid=l
https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.goodreads.com%2Fbook%2Fshow%2F45456916-germ-warfare&psig=AOvVaw09bmaCC2rFflAI7lndt44Q&ust=1711917757128000&source=images&cd=vfe&opi=89978449&ved=0CBIQjRxqFwoTCJiZ5dzsnIUDFQAAAAAdAAAAABAE
which should be
https://www.goodreads.com/book/show/45456916-germ-warfare
https://github.com/uBlockOrigin/uAssets/assets/91396482/05e5cf0d-4c8c-41ad-b7d7-1f80d493b6a5
URL(s) where the issue occurs
https://www.google.com
Describe the issue
When tapping on the search results, first a google URL is opened and then page is redirected to main search result URL. The link shown after right-clicking (long press on mobile) is also not the URL of search result. This can also be seen in DOM of webpage where the anchor tag
a
hasping
andoncontextmenu
(to prevent copying main URL and to replace it with ping URL) attributes which may be considered tracking, but I'm not sure. It definitely is an annoyance since it brings extra redirection and slows down browsing.Screenshot(s)
I have put screenshots in another issue on adguard filters page https://github.com/AdguardTeam/AdguardFilters/issues/64616.
Versions
Settings
Default settings.
Notes
I bypassed this with
google.com##+js(ra, ping|oncontextmenu, a)
, but it may not be accurate.