Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
HunterBoy344 authored Jun 15, 2024
1 parent 10f03f0 commit fcbe253
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function uploadFile() {

function sendMessage() {
let messageToSend = input4.value
ws.send(`{ "message" : "${messageToSend.replace(/"/g, '"')}", "username" : "${username.replace(/"/g, '"')}"}`)
ws.send(`{ "message" : "${messageToSend.replace(/\"/g,'\\"')}", "username" : "${username.replace(/\"/g,'\\"')}`)
input4.value = ""
}

Expand Down

0 comments on commit fcbe253

Please sign in to comment.