Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ublock href-sanitizer not working correctly as expected #3297

Closed
9 tasks done
hurgir opened this issue Jul 10, 2024 · 2 comments
Closed
9 tasks done

ublock href-sanitizer not working correctly as expected #3297

hurgir opened this issue Jul 10, 2024 · 2 comments
Labels
enhancement New feature or request fixed issue has been addressed

Comments

@hurgir
Copy link

hurgir commented Jul 10, 2024

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

ublock href-sanitizer scriplet does not show the desired behavior for links containing the % character in it. The same works as expected with the adguard addon and the filter rule.

A specific URL where the issue occurs.

https://forum.donanimhaber.com/mesaj/yonlen/159073416
https://forum.donanimhaber.com/mesaj/yonlen/159073515

Steps to Reproduce

1.add forum.donanimhaber.com##+js(href-sanitizer, a[href*="/ExternalLinkRedirect"][href*="url="], ?url) rule to my filters.
2.go to https://forum.donanimhaber.com/mesaj/yonlen/159073416
3.click on the amazon.com.tr link on the page

Expected behavior

direct access and opening of the desired site https://www.amazon.com.tr/Arzum-ARZUM-AR5029-ROSY-EP%C4%B0LAT%C3%96R/dp/B07F739SBS?language=tr_TR

Actual behavior

redirect to https://forum.donanimhaber.com/ExternalLinkRedirect?module=after-renderer-for-new-editor&messageId=159073416&url=https://www.amazon.com.tr/Arzum-ARZUM-AR5029-ROSY-EP%c4%b0LAT%c3%96R/dp/B07F739SBS

uBO version

1.58.0

Browser name and version

Brave 1.67.123 Chromium: 126.0.6478.126

Operating System and version

macOS Sonoma 14.5

gorhill added a commit to gorhill/uBlock that referenced this issue Jul 10, 2024
Related issue:
uBlockOrigin/uBlock-issues#3297

Mind that the sanitized URL can have Unicode characters beyond
ASCII.
@MasterKia MasterKia added enhancement New feature or request fixed issue has been addressed labels Jul 10, 2024
@hurgir
Copy link
Author

hurgir commented Jul 12, 2024

Hello, when I apply the rule

forum.donanimhaber.com##+js(href-sanitizer, a[href*="/ExternalLinkRedirect"][href*="url="], ?url)

and click on the link at this address: https://forum.donanimhaber.com/mesaj/yonlen/158899898, it redirects to https://www.temu.com/goods.html?_bg_fs=1 and truncates the rest of the link. However, the link in this message works as expected: https://forum.donanimhaber.com/mesaj/yonlen/158901348.
I noticed that the links which do not work correctly contain the word 'html'.

browser
Brave uBlock Origin development build
Version 1.58.1.103

@gorhill
Copy link
Member

gorhill commented Jul 12, 2024

it redirects to https://www.temu.com/goods.html?_bg_fs=1

It's a site issue, it's not properly encoding the URL.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed issue has been addressed
4 participants