Fixed Usernames not showing the letter "V" in them?

darren

Member
I've disabled addons in the config.php so I can't see it being an addon issue.

A user just made an account with the letter "V" in and it just replaced it with a space so "glove" would be "glo e" for example.

Any help would be greatly appreciate, "V" is not in the named letters from usernames btw.
 

Mike

XenForo developer
Staff member
Do you think you could submit a ticket via the customer area with FTP and ACP details?

It looks like your PCRE doesn't have \v (vertical white space). This is the first time I've seen this though.
 

darren

Member
Do you think you could submit a ticket via the customer area with FTP and ACP details?

It looks like your PCRE doesn't have \v (vertical white space). This is the first time I've seen this though.
Done Mike and thank you.
 

Mike

XenForo developer
Staff member
This is related to a 5+ years old PCRE install. You should probably contact your host about it. In general, it's preferable for PHP to be compiled with the built-in PCRE library (rather than the server version).
 

Mike

XenForo developer
Staff member
The fix is to replace this code in library/XenForo/DataWriter/User.php:
Code:
$newName = preg_replace('/\v+/u', ' ', $username);
if (is_string($newName))
{
        $username = $newName;
}
With:
Code:
// if this matches, then \v isn't known (appears to be PCRE < 7.2) so don't strip
if (!preg_match('/\v/', 'v'))
{
        $newName = preg_replace('/\v+/u', ' ', $username);
        if (is_string($newName))
        {
                $username = $newName;
        }
}
 

Veer

Well-known member
Thank you Mike, but my host has resolved this for me (without applying the fix above my post).
 
Top