Help Center Live Community

Development => Bug Discussions => Topic started by: rsd on January 25, 2010, 06:39:50 AM



Title: %%user%% and + in names
Post by: rsd on January 25, 2010, 06:39:50 AM
Another issue is that a nick name with '+'  (very unusual) on it will have the '+' translated to ' ' (space) when the macro '%%user%%' is used.

The reason is that the %%user%% macro for the guest is translated in PHP and the htmlentities in javascript.

To avoid this this will help in class/chat. php parse_message():

Code:
$this->message = preg_replace
( '/\+/'
, '+'
, preg_replace
( "/%%user%%/i"
, char_to_html( $_SESSION['hcl_'.$chatid]['guest'] )
, $this->message
)
);