From 02cbe6c19b4c4d676094f849cd05a740feb2360a Mon Sep 17 00:00:00 2001 From: Markus Date: Wed, 19 Jul 2023 11:56:38 +0200 Subject: [PATCH] [feature] chat component can now show clickable urls --- webapp/components/Chat/Chat.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index d7864ebef..d00133a56 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -315,6 +315,12 @@ export default { this.messagesLoaded = true } this.messagePage += 1 + + // hacky way to make urls clickable for the chat component + // --> linkify in the backend is changing the syntax of the url + this.messages.forEach((msg) => { + msg.content = msg.content.replace(/<\/?a[^>]*>/g, '') + }) } catch (error) { this.messages = [] this.$toast.error(error.message)