Skip to content
This repository was archived by the owner on Sep 9, 2022. It is now read-only.

whitelist wildcard not working when url contains # as wildcard #1078

Closed
ghost opened this issue Mar 23, 2015 · 5 comments
Closed

whitelist wildcard not working when url contains # as wildcard #1078

ghost opened this issue Mar 23, 2015 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 23, 2015

uBlock doesn't whitelist when the url contains # as wildcard, after wildcard works.
My actual case is with a youtube video with time stamp and the whitelist channel script which adds the user name at the end of the link for whitelisting.

my case:
whitelist "youtube.com/*&user=example"
https://www.youtube.com/watch?v=VIDEOID&user=example ------------- inactive
https://www.youtube.com/watch?v=VIDEOID#t=100&user=example ---- active! - expected: inactive

test case:
whitelist "example.org/*/page"
http://example.org --------------- active
http://example.org/1/page ----- inactive
http://example.org/1/page# --- inactive
http://example.org/#/page ----- active! - expected: inactive
http://example.org/#/1/page --- active! - expected: inactive

@ghost ghost changed the title whitelist wildcard not working when url contains # whitelist wildcard not working when url contains # as wildcard Mar 23, 2015
@gorhill
Copy link
Contributor

gorhill commented Mar 23, 2015

Yes, the fragment part is removed before testing a match. I didn't expect users wanting to activate/de-activate uBlock depending on the value of the fragment identifier.

I see the greasyfork script adds the &user=[...] at the end, regardless of whether it's adding it to the fragment identifier.

@my-password-is-password

Oh, so the '#' wasn't the comment character? I've been using it to comment since it turns red for '!'.

@gorhill
Copy link
Contributor

gorhill commented Mar 23, 2015

It is the comment character, if it is the first character.

@gorhill
Copy link
Contributor

gorhill commented Mar 23, 2015

@anon23462 You say "http://example.org/1/#page --- inactive". Are you sure? I can't reproduce that case, and if you look at it, this is expected, as there is no / before page.

@ghost
Copy link
Author

ghost commented Mar 23, 2015

Oh, yeah sorry. That one should've been "http://example.org/1/page#" as a case where the whitelisting works since the # is in the url part after the wildcard.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants