-
Notifications
You must be signed in to change notification settings - Fork 84
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
Comments
Related issue: uBlockOrigin/uBlock-issues#3297 Mind that the sanitized URL can have Unicode characters beyond ASCII.
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: browser |
I'm not sure if I should open a new issue, so I'm writing here instead. 1.Add the following filter: The same page, when accessed with the AdGuard Chrome extension and applying the same filter rule, redirects as expected to https://www.n11.com/arama?q=Ltb%20Lacivert%20Kazak%20011241601051219_301%20001 |
The URL parameter is not properly encoded by the website. The parameter value used is:
When properly encoded, it should have been:
|
This comment was marked as abuse.
This comment was marked as abuse.
Yes, because the URL is a parameter, it needs to go through let realURL = new URL('https://www.n11.com/arama?q=Ltb Lacivert Kazak 011241601051219_301 001');
console.log(realURL.href);
let trackerURL = new URL('https://example.com/');
trackerURL.searchParams.set('url', realURL.href);
console.log(trackerURL.href); Output:
|
Tolerate unexpected spaces in extracted URL parameters. Related feedback: uBlockOrigin/uBlock-issues#3297 (comment)
This comment was marked as abuse.
This comment was marked as abuse.
Tolerate unexpected spaces in extracted URL parameters. Related feedback: uBlockOrigin/uBlock-issues#3297 (comment)
Prerequisites
I tried to reproduce the issue when...
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.
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
The text was updated successfully, but these errors were encountered: