-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support emojis inside short links #767
Comments
Sounds like something nice to have. I will investigate the effort required to implement this. |
Hey @ayr-ton, I'm afraid I have to move this out of v2.3.0 It's turning out way more complex than I anticipated. Currently, the reason for which emojis are not supported is because when you provide a custom slug, it is filtered and normalized, applying a regex which only allows In order to support emojis, the unicode sequences of all known emojis have to be added to this regular expression. I more or less figured that out, but the problem is that it has to be negated (at the end the regex defines what's allowed, and everything else needs to be replaced), and it's not working as expected. I have also considered completely changing the approach, and allow any character in custom slugs but spaces, but that might potentially introduce some breaking change and nasty edge case that needs to be carefully tested. Because of that I will delay this a bit more, to avoid blocking the release of v2.3 any further, and spend a bit more time testing/investigating afterwards. |
Thanks for all the details, @acelaya Looking forward to future versions o/ |
I have made some progress on supporting emojis in Shlink. Basically, I have simplified how custom slugs are processed, allowing any character but However, there's still two other things to tackle.
|
Summary
Today emojis are mostly UTF-8 chars, so is possible to put them in links like:
https://blog.rebrandly.com/add-emojis-to-short-links/
So, a great feature would be allowing UTF-8 chars inside the custom shortlink box and let the UTF-8 magic to happen. 🤸🏻♂️
This requires changes in the database too, as current collation (utf8 instead of utf8mb4) does not support all emojis.
The text was updated successfully, but these errors were encountered: