fix: add decoding logic to app router params (#18712)

* decode app router params in buildLegacyCtx

* add helpful comments

* add comment

* address comment
This commit is contained in:
Benny Joo authored and GitHub committed 2025-01-16 15:14:03 +00:00
1 parent b7f7c33afc
commit c37a8a587b
3 files changed
+27 -2

No files matched your search

+1 -1
View File
@@ -178,7 +178,7 @@ export const getUsernameList = (users: string | string[] | undefined): string[]
// So, even though this code handles even if individual user is dynamic link, that isn't a possibility right now.
users = arrayCast(users);
const allUsers = users.map((user) => user.replace(/( |%20|%2b)/g, "+").split("+")).flat();
const allUsers = users.map((user) => user.replace(/( |%20|%2b)/gi, "+").split("+")).flat();
return Array.prototype.concat(...allUsers.map((userSlug) => slugify(userSlug)));
};