rohan13 commited on
Commit
b945bb5
Β·
1 Parent(s): 6df4631

updated startup message

Browse files
Files changed (1) hide show
  1. static/chatbot.js +7 -2
static/chatbot.js CHANGED
@@ -21,9 +21,14 @@ $(document).ready(function() {
21
  }
22
 
23
  // Function to display message
24
- function displayMessage(message, isUser) {
25
  var $message = $('<div>').addClass('chat-message round');
26
- var $messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s]+)/g, '<a href="$1">$1</a>'));
 
 
 
 
 
27
 
28
  $message.append($messageText);
29
  if (isUser) {
 
21
  }
22
 
23
  // Function to display message
24
+ function displayMessage(message, isUser, hasHtml) {
25
  var $message = $('<div>').addClass('chat-message round');
26
+ var $messageText
27
+ if (hasHTML) {
28
+ $messageText = $('<p>').html(message);
29
+ } else {
30
+ $messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s]+)/g, '<a href="$1">$1</a>'));
31
+ }
32
 
33
  $message.append($messageText);
34
  if (isUser) {