phpBBSEO / usu

Ultimate SEO URL
32 stars 25 forks source link

Member names containing '&' returns "user does not exist" if profile_noids = true #87

Open hbcafe opened 9 years ago

hbcafe commented 9 years ago

If profile_noids = true, member URLs include their name in the URL. If their name includes "&" (e.g., "Tim & Son"), the "&" is mapped to %26, which doesn't match the username_clean in users table. Subsequently the member URL (forum/member/tim%26son) returns "user does not exist". The username_clean is "tim & amp; son" (space added to clarity).

I worked around this by modifying usu/core.php:

public function seo_url_encode($url)
{
    $url = str_replace('&', 'and', $url); // workaround

And changing username_clean name with "& amp;" to "and". It's an imperfect solution.