diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index a1dc1dac..b3cca3fc 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -682,7 +682,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { req: { roomSeq: this.roomInfoSubject.value.roomSeq, eventType: EventType.Character, - sentMessage: message + sentMessage: StringUtil.escapeHtml(message) } }) ); @@ -717,7 +717,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { const stickerJson: StickerEventJson = { name: '스티커', file: this.selectedSticker.index, - chat: !!message ? message.trim() : '' + chat: !!message ? StringUtil.escapeHtml(message.trim()) : '' }; this.store.dispatch( EventStore.send({ @@ -750,7 +750,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { /** Send Translation message */ sendMessageOfTranslate(message: string) { const destLocale = this.destLocale; - const original = message; + const original = StringUtil.escapeHtml(message); const roomSeq = this.roomInfoSubject.value.roomSeq; if (!!this.isTranslationProcess) { diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html index 3c2db106..e9f7a85f 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/text.component.html @@ -1,3 +1,3 @@