• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Can't tag a user with \\ in front of their name

Steve F

Well-known member
#1
Not sure if it happens on other things as well but we have a user with \\ in front of their name and we can't tag them, name does not come up in the preview either. We changed the users name to just have 1 '\' but we still can't tag them.
 

Mike

XenForo developer
Staff member
#7
Fixed now. Looks like a bug with the actual look up -- this is a place where we needed to double escape backslashes.

Regarding @[name here] type matches, they create an ambiguity with BB codes so they can't be tagged. That's generally as designed (it mostly just applies if their name starts with a "[").
 

Steve F

Well-known member
#8
Fixed now. Looks like a bug with the actual look up -- this is a place where we needed to double escape backslashes.

Regarding @[name here] type matches, they create an ambiguity with BB codes so they can't be tagged. That's generally as designed (it mostly just applies if their name starts with a "[").

Could you share the fix @Mike? If it is easy enough to do.

Thanks!
 

Mike

XenForo developer
Staff member
#9
In library/XenForo/Db.php, change:
Code:
$string = str_replace(array('%', '_'), array('\\%', '\\_'), $string);
to:
Code:
$string = str_replace(array('\\', '%', '_'), array('\\\\', '\\%', '\\_'), $string);
 
Last edited: