Encode username in navigation link to handle special characters

This commit is contained in:
2025-06-24 11:10:15 +08:00
parent 8136e32d55
commit b818777a45

View File

@@ -250,7 +250,7 @@ function UserButton() {
<li>
<a
onClick={() => {
navigate(`/user/${app.user?.username}`);
navigate(`/user/${encodeURIComponent(app.user!.username)}`);
const menu = document.getElementById(
"navi_dropdown_menu",
) as HTMLUListElement;