[Vtigercrm-commits] [vtiger-commits] r7907 - /branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Jul 8 18:13:02 EDT 2006
Author: mmbrich
Date: Sat Jul 8 16:13:01 2006
New Revision: 7907
Log:
more newline and special charater fixes
Modified:
branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php Sat Jul 8 16:13:01 2006
@@ -57,7 +57,7 @@
$ret .= '"sending_user":"'.$msg[$i]["sending_user"].'",';
$ret .= '"user_name":"'.$msg[$i]["user_name"].'",';
$ret .= '"timestamp":"'.$msg[$i]["sentdate"].'",';
- $ret .= '"msg_data":"'.$msg[$i]["msg_data"].'"}';
+ $ret .= '"msg_data":"'.stripslashes($msg[$i]["msg_data"]).'"}';
if(($i+1) == $cnt)
$ret .= '}';
@@ -99,10 +99,10 @@
if($_REQUEST["command"] == "sendChatMessage") {
require_once("modules/CommSystem/CommSystem.php");
$commSys = new CommSystem();
- if($commSys->SendAlert(str_replace("\n","<br>",trim($_REQUEST["msg"])),$_REQUEST["msg_type"],'0',$_SESSION["authenticated_user_id"],$_REQUEST["receivers"]) == "false")
+ if($commSys->SendAlert(str_replace("\n","<br>",addslashes($_REQUEST["msg"])),$_REQUEST["msg_type"],'0',$_SESSION["authenticated_user_id"],$_REQUEST["receivers"]) == "false")
echo "failed";
else
- echo str_replace("\n","<br>",$_REQUEST["msg"]);
+ echo nl2br($_REQUEST["msg"]);
}
if($_REQUEST["command"] == "sendStatusMessage") {
$ret = send_typing_message($_REQUEST["receivers"]);
More information about the vtigercrm-commits
mailing list