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> <li>
<a <a
onClick={() => { onClick={() => {
navigate(`/user/${app.user?.username}`); navigate(`/user/${encodeURIComponent(app.user!.username)}`);
const menu = document.getElementById( const menu = document.getElementById(
"navi_dropdown_menu", "navi_dropdown_menu",
) as HTMLUListElement; ) as HTMLUListElement;