Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sanitize trailing ? when stripping analytics parameters from URL
Safari doesn't remove the ? from a URL when setting `url.search = ''` which results in links not correctly applying `:visited`. For example, before this change: https://www.reddit.com/?utm_foo=bar -> https://www.reddit.com/? and links to https://www.reddit.com/ don't render as :visited After this change, https://www.reddit.com/?utm_foo=bar -> https://www.reddit.com/ and links to https://www.reddit.com/ are properly empurpled. Additionally, hash is preserved: https://www.reddit.com/?utm_foo=bar&baz=qux#hoopla -> https://www.reddit.com/?baz=qux#hoopla
- Loading branch information