Update of /cvsroot/phpmychat/phpMyChat-0.15/chat
In directory usw-pr-cvs1:/tmp/cvs-serv16741/chat
Modified Files:
users.php3
Log Message:
Fix some bugs with slashed quotes
Index: users.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/users.php3,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** users.php3 2001/04/04 08:36:06 1.2
--- users.php3 2001/04/04 09:04:09 1.3
***************
*** 73,90 ****
/**
- * Add two slashes before single quotes
- *
- * @param string the string to be slashed
- *
- * @return string the slashed string
- *
- * @access public
- */
- function pmcDoubleSlash($theString)
- {
- return str_replace('\'', '\\\\\'', $theString);
- } // end of the 'pmcDoubleSlash()' function
-
- /**
* Format an username according to the status of the user
*
--- 73,76 ----
***************
*** 155,159 ****
$usersCnt = 0;
! $usersList[] = '<b>' . htmlspecialchars($slashedCurrentRoomName) . '<b>'
. '<span class="small">'
. '<bdo dir="' . $textDirection . '"></bdo>'
--- 141,145 ----
$usersCnt = 0;
! $usersList[] = '<b>' . htmlspecialchars($dbSessionVars['targetRoom']) . '<b>'
. '<span class="small">'
. '<bdo dir="' . $textDirection . '"></bdo>'
***************
*** 183,187 ****
. (($username == $dbSessionVars['nick'])
? '\'PROFILE\', \'\''
! : '\'WHOIS\', \'' . pmcDoubleSlash(pmcSpecialChars($username, $latin1)) .'\'')
. '); return false;" class="user">'
. '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '" />'
--- 169,173 ----
. (($username == $dbSessionVars['nick'])
? '\'PROFILE\', \'\''
! : '\'WHOIS\', \'' . pmcSlashSingleQuotes(pmcSpecialChars($username, $latin1)) .'\'')
. '); return false;" class="user">'
. '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '" />'
***************
*** 196,200 ****
if ($username != $dbSessionVars['nick'])
{
! $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcDoubleSlash(pmcSpecialChars($username, $latin1)) . '\', false)" class="user">'
. pmcFormatUsername($username, $latin1, $status)
. '</a><br />';
--- 182,186 ----
if ($username != $dbSessionVars['nick'])
{
! $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcSlashSingleQuotes(pmcSpecialChars($username, $latin1)) . '\', false)" class="user">'
. pmcFormatUsername($username, $latin1, $status)
. '</a><br />';
***************
*** 331,340 ****
$gender = 'none';
if ($status != 'u' && $status != 'k' && $status != 'd' && $status != 'b')
! $tmpStr = '<a href="#" onclick="window.parent.pmcRunCmd(\'WHOIS\', \''. pmcDoubleSlash(pmcSpecialChars($otherUser, $latin1)) . '\'); return false" class="user">'
. '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '">'
. '</a> ';
else
$tmpStr = '<img src="images/gender_none.gif" width="14" height="14" border="0" alt="' . L_NO_PROFILE . '"> ';
! $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcDoubleSlash(pmcSpecialChars($otherUser, $latin1)) . '\', false)" class="user">'
. pmcFormatUsername($otherUser, $latin1, $status)
. '</a><br />';
--- 317,326 ----
$gender = 'none';
if ($status != 'u' && $status != 'k' && $status != 'd' && $status != 'b')
! $tmpStr = '<a href="#" onclick="window.parent.pmcRunCmd(\'WHOIS\', \''. pmcSlashSingleQuotes(pmcSpecialChars($otherUser, $latin1)) . '\'); return false" class="user">'
. '<img src="images/gender_' . $gender . '.gif" width="14" height="14" border="0" alt="' . L_PROFILE . '">'
. '</a> ';
else
$tmpStr = '<img src="images/gender_none.gif" width="14" height="14" border="0" alt="' . L_NO_PROFILE . '"> ';
! $tmpStr .= '<a href="javascript:window.parent.pmcUserClick(\'' . pmcSlashSingleQuotes(pmcSpecialChars($otherUser, $latin1)) . '\', false)" class="user">'
. pmcFormatUsername($otherUser, $latin1, $status)
. '</a><br />';
|