mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 05:39:06 +00:00
Set chat session title to textContent of the chat session HTML element
We don't expect/want the user to use HTML titles for chat session
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
linkElement.classList.add("inline-chat-link");
|
||||
linkElement.classList.add("reference-link");
|
||||
linkElement.setAttribute('title', title);
|
||||
linkElement.innerHTML = title;
|
||||
linkElement.textContent = title;
|
||||
|
||||
let referenceButton = document.createElement('button');
|
||||
referenceButton.innerHTML = linkElement.outerHTML;
|
||||
@@ -785,7 +785,7 @@
|
||||
let conversationButton = document.createElement('div');
|
||||
let incomingConversationId = conversation["conversation_id"];
|
||||
const conversationTitle = conversation["slug"] || `New conversation 🌱`;
|
||||
conversationButton.innerHTML = conversationTitle;
|
||||
conversationButton.textContent = conversationTitle;
|
||||
conversationButton.classList.add("conversation-button");
|
||||
if (incomingConversationId == conversationId) {
|
||||
conversationButton.classList.add("selected-conversation");
|
||||
@@ -883,7 +883,7 @@
|
||||
fetch(`${hostURL}${editURL}` , { method: "PATCH" })
|
||||
.then(response => response.ok ? response.json() : Promise.reject(response))
|
||||
.then(data => {
|
||||
conversationButton.innerHTML = newTitle;
|
||||
conversationButton.textContent = newTitle;
|
||||
})
|
||||
.catch(err => {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user