Skip to content

Fix linkedin regex acceptance (issue #1507)#5133

Merged
idoshamun merged 2 commits intodailydotdev:mainfrom
syu213:simonbugfix
Dec 9, 2025
Merged

Fix linkedin regex acceptance (issue #1507)#5133
idoshamun merged 2 commits intodailydotdev:mainfrom
syu213:simonbugfix

Conversation

@syu213
Copy link
Copy Markdown
Contributor

@syu213 syu213 commented Dec 5, 2025

Changes

  • fix issue 🐛 BUG: accented characters not being accepted in the app for handles daily#1507
  • Fixed regex patterns to support Unicode and accented characters in user handles and social
    media usernames
  • Updated handleRegex and socialHandleRegex in packages/shared/src/graphql/users.ts to
    use Unicode property escapes (\p{L} for letters, \p{N} for numbers)
  • Added comprehensive unit tests to verify accented character support works correctly

Events

Did you introduce any new tracking events?
No

Experiment

Did you introduce any new experiments?
No

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Fixes dailydotdev#1507 - Accented characters not being accepted in the app for handles

Updated regex patterns in packages/shared/src/graphql/users.ts to use Unicode
property escapes (\p{L} for letters, \p{N} for numbers) instead of ASCII-only
character classes. This enables support for international characters such as:

- Spanish: José, í, ó
- French: François, café
- German: Müller, über
- Scandinavian: Björn, Øyvind
- And many other Unicode characters

The fix maintains backward compatibility with existing ASCII usernames while
making the platform inclusive for global users.
Add comprehensive test coverage for the Unicode character support fix:
- Tests accented characters in social handles (ítalo-oliveira, José, François)
- Tests Unicode characters from various languages (Cyrillic, Chinese, Arabic)
- Tests mixed Unicode and ASCII combinations
- Verifies backward compatibility with ASCII characters
- Tests edge cases and validation rules
@syu213 syu213 requested a review from a team as a code owner December 5, 2025 23:44
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 5, 2025

@syu213 is attempting to deploy a commit to the Daily Dev Team on Vercel.

A member of the Team first needs to authorize it.

@syu213 syu213 changed the title Fix linkedin regex acceptance Fix linkedin regex acceptance (issue #1507) Dec 5, 2025
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
daily-webapp Error Error Dec 7, 2025 7:38am

@idoshamun
Copy link
Copy Markdown
Member

@syu213 thanks a lot for the contribution. can you validate if other social networks allow unicode? This might be a linkedin only thing

@syu213
Copy link
Copy Markdown
Contributor Author

syu213 commented Dec 7, 2025

@syu213 thanks a lot for the contribution. can you validate if other social networks allow unicode? This might be a linkedin only thing

looked into it, youtube allows it too, but others (x, github, instagram) dont allow usernames to have it, worst case is they try a instagram username with unicode like @Café (instagram.com/caf%C3%A9/) and it just gives back a 404 error as if they made a typo in their url. (same as if they did instagram.com/asdnasnid190341923901209/ or something, just gives back Profile isn't available
The link may be broken, or the profile may have been removed.)

@idoshamun
Copy link
Copy Markdown
Member

Fair enough, last thing, you should open a PR for our api to update the regex there as well. Otherwise, client validation passes but server validation will fail. See here: https://github.com/dailydotdev/daily-api/blob/29c67c0eb48c7306378e47962d2e0fcb18b3a9f5/src/common/object.ts#L49

@syu213
Copy link
Copy Markdown
Contributor Author

syu213 commented Dec 9, 2025

Fair enough, last thing, you should open a PR for our api to update the regex there as well. Otherwise, client validation passes but server validation will fail. See here: https://github.com/dailydotdev/daily-api/blob/29c67c0eb48c7306378e47962d2e0fcb18b3a9f5/src/common/object.ts#L49

dailydotdev/daily-api#3330

yup, here is the PR for the daily-api repo! please let us know if they are valid, or if any changes are necessary

@idoshamun idoshamun merged commit e8e5794 into dailydotdev:main Dec 9, 2025
2 of 6 checks passed
@idoshamun
Copy link
Copy Markdown
Member

Thanks a lot! For the contribution 💪
I left a review on API as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants