Skip to content
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

Unicode regex support #1566

Closed
fduraibi opened this issue Dec 3, 2015 · 1 comment
Closed

Unicode regex support #1566

fduraibi opened this issue Dec 3, 2015 · 1 comment

Comments

@fduraibi
Copy link
Contributor

fduraibi commented Dec 3, 2015

Currently UTF8_Names_Validation by default supports English letters only. Similarly when creating an avatar based on username initials in avatar.coffee it only allow characters in this range A-Za-z0-9.

However, instead of finding every regex possible for all supported languages there are Unicode regular expressions that handles all letters: source

You can match a single character belonging to the "letter" category with \p{L}
You can match a single character not belonging to that category with \P{L}

so the regex can be written as [\p{L}0-9] instead of [A-Za-z0-9]. However, javascript does not have native support for these unicode regex.

I see two solutions for such problem:
1- Include an addon js library that supports unicode regex (such as https://github.com/slevithan/xregexp)
2- Change all hard-coded regex to variables that can be set from the Administration page just like UTF8_Names_Validation

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@MartinSchoeler
Copy link
Contributor

This would be a very nice feature, but unfortunately it does not align with our current roadmap, so it's probable that it would not be implemented in the near future. I will be closing this issue for now, if we plan to add a feature like this we will reopen this issue. Thanks for the valuable feedback!

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

No branches or pull requests

3 participants