Spaces:
Runtime error
Runtime error
fixed js
Browse files- static/chatbot.js +1 -1
static/chatbot.js
CHANGED
@@ -24,7 +24,7 @@ $(document).ready(function() {
|
|
24 |
function displayMessage(message, isUser, hasHtml) {
|
25 |
var $message = $('<div>').addClass('chat-message round');
|
26 |
var $messageText
|
27 |
-
if (
|
28 |
$messageText = $('<p>').html(message);
|
29 |
} else {
|
30 |
$messageText = $('<p>').html(message.replace(/(https?:\/\/[^\s]+)/g, '<a href="$1">$1</a>'));
|
|
|
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>'));
|