Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
non-ascii symbols cause errors
lukoie
New
If my users wants to change their name to something non-ascii, there's error message, saying "username can only contain letters, numbers, underscores and must be between 3 and 20 characters long"
so they cant use cyrillic for their name
but when you create user, it can be created with cyrillic name, so basically if you want to change your signature, you must edit your profile, which cannot be done, because vanilla says that user name is invalid!
also, if you create user with cyrillic name, you cant see his activity string, because instead of opening url http://sitename.com/profile/activity/2/nick it tries to open http://sitename.com/profile/activity/2
so, having cyrillic name it fails open activity page in the user profile, but "discussions" page in the user profile is ok
so they cant use cyrillic for their name
but when you create user, it can be created with cyrillic name, so basically if you want to change your signature, you must edit your profile, which cannot be done, because vanilla says that user name is invalid!
also, if you create user with cyrillic name, you cant see his activity string, because instead of opening url http://sitename.com/profile/activity/2/nick it tries to open http://sitename.com/profile/activity/2
so, having cyrillic name it fails open activity page in the user profile, but "discussions" page in the user profile is ok
0
Comments
1) go ahead and edit this file: {Your Vanilla Folder}/library/core/functions.validation.php
2) look for this line: and replace it with this: 3) save the file & your done!
What we have just done was changing the Regex filter from ascii-only to Unicode,
which will allow you to use any kind of letters from any language..
you can also customize your filter to allow or disallow specific characters by adding or removing Unicode components (the "p{x}" components within the Regex filter). Here is a small list of what each of those components mean:
\p{L}: any kind of letter from any language.
\p{Lm}: a special character that is used like a letter.
\p{M}: a character intended to be combined with another character (e.g. accents, umlauts, enclosing boxes, etc.).
\p{N}: any kind of numeric character in any script.
\p{Z}: any kind of whitespace or invisible separator.
\p{Pd} or \p{Dash_Punctuation}: any kind of hyphen or dash.
\p{Pc}: a punctuation character such as an underscore that connects words.
for a complete list of Unicode components, refer to this url:
http://www.regular-expressions.info/unicode.html
hope you find it easy to understand
good luck!!
Also, I assume this will only work on specific encodings, i.e. UTF-8 in this case, and not any other unicode encodings. I am wondering whether these preg rules need to be handled in some central place in Vanilla, so that different site-wide encodings can automatically be adjusted for.