Repository navigation
Hash tag wrongly encoded #189
Description
Activity
Ok, seems to be a bug indeed. I guess I have to write something like
URLSearchParamsmyself for the hash part of a URL.Reacted by OsmiridiumPlease also note the appended
=at the end.
Something similar happens with this URL: https://www.typescriptlang.org/tsconfig#target
See microsoft/TypeScript-Website#2318Reacted by Jordan Atwood, Avinash Sonawane and OsmiridiumI ran into this issue when trying to load the following link https://www.typescriptlang.org/play?q=315#example/enums
The url gets transformed to "https://www.typescriptlang.org/play?q=315#example%2Fenums=", and I see the error "There was an issue getting the example, bad URL? Check the console in the developer tools" on the TypeScript website.
I had initially reported the issue webcompat/web-bugs#102413 thinking it was a Firefox vs Chrome issue.
Reacted by OsmiridiumThis effects Jelllyfin Web GUI as well.
Reacted by FunctionDJ, Félix Piédallu, MariusSp, Hassaan Abdul Razzaq, zotabee and OsmiridiumCan confirm this is still happening, the AWS console is another example of a website that completely breaks because it relies on hash-based navigation (e.g. when you move between tabs of the same page).
Example:
https://us-east-1.console.aws.amazon.com/iam/home#/users/foo?section=groups(Thanks for your work in any case :D)
Reacted by Osmiridiumcan't reproduce with 1.27.1, probably was fixed in 0d7381f
Reacted by zotabee- added sub-issues
on Jul 30, 2026
This kind of URL
http://abc.com/#k/some/hashis wrongly replaced byhttp://abc.com/#k%2Fsome%2Fhash=.This leads to many issues with some websites.
This can be easily tested and reproduced with embedded
cleaningTool.html(at least on Firefox).This issue may be linked to these #86 and #100
The bug is here: https://github.com/ClearURLs/Addon/blob/b67a6569185d18a7df94805538e0480abef43517/core_js/tools.js#L127=
The hash part (what is called fragments) should not be converted as a
URLSearchParamsobject and then used after atoString()call.