瀏覽代碼

Update refreshmessages.php

causefx 8 年之前
父節點
當前提交
00aec0fd44
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      chat/refreshmessages.php

+ 3 - 3
chat/refreshmessages.php

@@ -128,7 +128,7 @@ function decryptmessage($msg)
 
 if( count($newmessages) == 1 )
 {
-    echo $newmessages[0];
+    echo htmlspecialchars($newmessages[0], ENT_QUOTES);
 }
 else
 {
@@ -136,11 +136,11 @@ else
     {
         if( $i == count($newmessages) - 1 )
         {
-            echo $newmessages[$i];
+            echo htmlspecialchars($newmessages[$i], ENT_QUOTES);
         }
         else
         {
-            echo $newmessages[$i] . "###endofmessage###";
+            echo htmlspecialchars($newmessages[$i], ENT_QUOTES) . "###endofmessage###";
         }
     }
 }