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
When there is space in user name he won't get mentions on his name. #308
Comments
The problem is within getMentions().
The solution: |
I don't understand the issue? |
Okay. Create user with user name '@user User' -> there is space in his name. Try to mention him using '@'. He won't get any notification, until you add this fix: $content = htmlentities($content); in getMentions(). |
@inliquid You mean like so: public function getMentions($content)
{
$content = htmlentities($content);
preg_match_all('/(^|[\s,\.:\]])@([^\s[\]]{2,40})\b/iu', $content, $matches, PREG_SET_ORDER);
$names = array();
foreach ($matches as $k => $v) $names[] = str_replace(" ", " ", $v[2]);
return $names;
} |
@tvb yes, exactly. |
Ok, nice. There are still problems with @ mentioning usernames containing spaces and special characters. The username http://www.esotalk.org/member/name/DirkJan Unfortunately the profile is not correctly linked and cannot be loaded. |
I can't reproduce this on my system. There should be member id after name/, like this http://www.esotalk.org/member/name/999-Dirk-Jan. Maybe it wasn't space (ascii 0x20) when entering name? |
Look at this oneas well #306 |
Sec. I'll make a screenshot. |
What are those fixes? And can you try to reproduce it with username |
I'd fixed slug function, I think this fix is now included in development branch, plus these fixes of #306, I have written in description there. Just a minute will try this user name. |
I am running dev version so the fix should be included already.. |
And added the |
Look at #311 |
I don't want to block characters from username, it should work in all cases. |
It will not work with existing mechanism with any special character. (And I'm not sure it's possible - you have to somehow understand that here is the end of nickname, righ now it's sequence that will not be transformed, but real space or puctuation breaks the line. |
I understand it is somewhat impossible with the current implementation. Hmmm |
Subj.
The text was updated successfully, but these errors were encountered: