Help Center Live Community
April 23, 2014, 06:13:12 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: %%user%% and + in names  (Read 3474 times)
rsd
Not too much to say...
*
Offline Offline

Posts: 6


« 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
)
);
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.153 seconds with 20 queries.

Google visited last this page April 08, 2014, 12:34:45 PM