monra commited on
Commit
40cdb75
1 Parent(s): cfd23da

Keeps line breaks submitted by the user

Browse files
Files changed (1) hide show
  1. client/js/chat.js +2 -2
client/js/chat.js CHANGED
@@ -197,7 +197,7 @@ const add_user_message_box = (message) => {
197
  const contentDiv = document.createElement("div");
198
  contentDiv.classList.add("content");
199
  contentDiv.id = `user_${token}`;
200
- contentDiv.textContent = message;
201
 
202
  messageDiv.appendChild(avatarContainer);
203
  messageDiv.appendChild(contentDiv);
@@ -293,7 +293,7 @@ const load_user_message_box = (content) => {
293
 
294
  const contentDiv = document.createElement("div");
295
  contentDiv.classList.add("content");
296
- contentDiv.textContent = content;
297
 
298
  messageDiv.appendChild(avatarContainer);
299
  messageDiv.appendChild(contentDiv);
 
197
  const contentDiv = document.createElement("div");
198
  contentDiv.classList.add("content");
199
  contentDiv.id = `user_${token}`;
200
+ contentDiv.innerText = message;
201
 
202
  messageDiv.appendChild(avatarContainer);
203
  messageDiv.appendChild(contentDiv);
 
293
 
294
  const contentDiv = document.createElement("div");
295
  contentDiv.classList.add("content");
296
+ contentDiv.innerText = content;
297
 
298
  messageDiv.appendChild(avatarContainer);
299
  messageDiv.appendChild(contentDiv);