diff --git a/assets/chat/js/menus/ChatUserInfoMenu.js b/assets/chat/js/menus/ChatUserInfoMenu.js index ccb7fe34..57b6c9ee 100644 --- a/assets/chat/js/menus/ChatUserInfoMenu.js +++ b/assets/chat/js/menus/ChatUserInfoMenu.js @@ -359,10 +359,18 @@ export default class ChatUserInfoMenu extends ChatMenuFloating { nextMsg = nextMsg.next('.msg-continue'); } this.messageArray.forEach((element) => { - const text = element.find('.text')[0].innerText; + const textContainer = element.find('.text')[0]; + let rawText = ''; + for (const node of textContainer.childNodes) { + if (node instanceof HTMLAnchorElement) { + rawText += node.href; + } else { + rawText += node.textContent; + } + } // Create a new `ChatUser` to remove username styles for a cleaner look. - const msg = MessageBuilder.message(text, new ChatUser(nick)); + const msg = MessageBuilder.message(rawText, new ChatUser(nick)); displayedMessages.push(msg.html(this.chat)); }); }