Update of /cvsroot/phpmychat/phpMyChat-0.15/chat
In directory usw-pr-cvs1:/tmp/cvs-serv31386/chat
Modified Files:
input.php3 handle_input.php3
Log Message:
Special characters don't need to be backslashed with HTML!
Index: input.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/input.php3,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** input.php3 2001/04/23 18:22:14 1.25
--- input.php3 2001/04/27 18:28:53 1.26
***************
*** 137,141 ****
// Tests for 'true' messages
! if ((!isset($prevMessage) || $message != $prevMessage)
&& !($isCommand || isset($error)))
{
--- 137,141 ----
// Tests for 'true' messages
! if ((!isset($prevMessage) || $message != str_replace('"', '"', $prevMessage))
&& !($isCommand || isset($error)))
{
***************
*** 187,193 ****
* Displays the frame
*
! * Uses the 'pmcUrlForStyleSheet()', the 'pmcSlashSingleQuotes()' and the
! * 'pmcSlashDoubleQuotes()' functions from the
! * 'chat/lib/common.lib.php3' library
*/
// The url for the style sheet
--- 187,192 ----
* Displays the frame
*
! * Uses the 'pmcUrlForStyleSheet()' and the 'pmcSlashSingleQuotes()' functions
! * from the 'chat/lib/common.lib.php3' library
*/
// The url for the style sheet
***************
*** 233,237 ****
<!-- Last sent message or command (used for the '/!' command) -->
! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? pmcSlashDoubleQuotes($message) : ''); ?>" />
<!-- Addressee that will be filled when the user click on a nick at the users frame -->
--- 232,236 ----
<!-- Last sent message or command (used for the '/!' command) -->
! <input type="hidden" name="prevMessage" value="<?php echo(isset($message) ? str_replace('"', '"', $message) : ''); ?>" />
<!-- Addressee that will be filled when the user click on a nick at the users frame -->
***************
*** 256,260 ****
// message if the bowser does not know JavaScript);
// - else nothing.
! $msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : '';
if (isset($error))
{
--- 255,259 ----
// message if the bowser does not know JavaScript);
// - else nothing.
! $msgValue = ($displayMessage) ? $prevMessage : '';
if (isset($error))
{
***************
*** 262,271 ****
{
$msgValue = ($dbSessionVars['jsVersion'] == 'noJs')
! ? '< ' . $error . ' > ' . pmcSlashDoubleQuotes($message)
! : pmcSlashDoubleQuotes($message);
}
else if ($dbSessionVars['jsVersion'] == 'noJs')
{
! $msgValue = $error;
}
}
--- 261,270 ----
{
$msgValue = ($dbSessionVars['jsVersion'] == 'noJs')
! ? str_replace('"', '"', '< ' . $error . ' > ' . $message)
! : str_replace('"', '"', $message);
}
else if ($dbSessionVars['jsVersion'] == 'noJs')
{
! $msgValue = str_replace('"', '"', $error);
}
}
Index: handle_input.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** handle_input.php3 2001/04/21 19:37:40 1.20
--- handle_input.php3 2001/04/27 18:28:53 1.21
***************
*** 186,191 ****
* "Displays" the frame
*
! * The 'pmcSlashSingleQuotes()' and the 'pmcSlashDoubleQuotes()' functions are
! * defined in the 'chat/lib/common.lib.php3' script
*/
?>
--- 186,191 ----
* "Displays" the frame
*
! * The 'pmcSlashSingleQuotes()' function is defined in the
! * 'chat/lib/common.lib.php3' script
*/
?>
***************
*** 203,207 ****
with (window.parent.frames['input'].window.document.forms['inputForm'])
{
! elements['prevMessage'].value = '<?php echo(isset($message) ? pmcSlashSingleQuotes(pmcSlashDoubleQuotes($message)) : ''); ?>';
<?php
--- 203,207 ----
with (window.parent.frames['input'].window.document.forms['inputForm'])
{
! elements['prevMessage'].value = '<?php echo(isset($message) ? addslashes($message) : ''); ?>';
<?php
***************
*** 210,216 ****
// - last submission if it was an erroneous command;
// - else nothing.
! $msgValue = ($displayMessage) ? pmcSlashDoubleQuotes($prevMessage) : '';
if (isset($error) && !($isCommand))
! $msgValue = pmcSlashSingleQuotes(pmcSlashDoubleQuotes($message));
?>
elements['message'].value = '<?php echo($msgValue); ?>';
--- 210,216 ----
// - last submission if it was an erroneous command;
// - else nothing.
! $msgValue = ($displayMessage) ? addslashes($prevMessage) : '';
if (isset($error) && !($isCommand))
! $msgValue = addslashes($message);
?>
elements['message'].value = '<?php echo($msgValue); ?>';
***************
*** 220,224 ****
elements['sent'].value = '0';
! if (document.all)
elements['submitType'].disabled = false;
}
--- 220,224 ----
elements['sent'].value = '0';
! if (typeof(elements['submitType'].disabled) != 'undefined')
elements['submitType'].disabled = false;
}
|