From 1f64a4d4284fd5478d67c57551503d3bf792e1c0 Mon Sep 17 00:00:00 2001 From: richard-loafle <44828666+richard-loafle@users.noreply.github.com> Date: Mon, 10 Feb 2020 15:37:02 +0900 Subject: [PATCH] script injection is modified --- .../layouts/messenger/components/messages.component.ts | 8 ++++---- .../message-box/mass-translation.component.html | 7 +++++-- .../src/lib/components/message-box/mass.component.html | 5 ++++- .../src/lib/components/message-box/sticker.component.html | 5 ++++- .../src/lib/components/message-box/text.component.html | 2 +- .../src/lib/components/list-item.component.html | 5 ++++- .../ucap-webmessenger-ui/src/lib/pipes/safe-html.pipe.ts | 5 ++++- 7 files changed, 26 insertions(+), 11 deletions(-) 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 116b2b97..c984696c 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 @@ -691,7 +691,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { req: { roomSeq: this.roomInfoSubject.value.roomSeq, eventType: EventType.Character, - sentMessage: StringUtil.escapeHtml(message) + sentMessage: message } }) ); @@ -726,7 +726,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { const stickerJson: StickerEventJson = { name: '스티커', file: this.selectedSticker.index, - chat: !!message ? StringUtil.escapeHtml(message.trim()) : '' + chat: !!message ? message.trim() : '' }; this.store.dispatch( EventStore.send({ @@ -751,7 +751,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { roomSeq: this.roomInfoSubject.value.roomSeq, eventType: EventType.MassText, // sentMessage: message.replace(/\n/gi, '\r\n') - sentMessage: StringUtil.escapeHtml(message) + sentMessage: message } }) ); @@ -759,7 +759,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { /** Send Translation message */ sendMessageOfTranslate(message: string) { const destLocale = this.destLocale; - const original = StringUtil.escapeHtml(message); + const original = message; const roomSeq = this.roomInfoSubject.value.roomSeq; if (!!this.isTranslationProcess) { diff --git a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html index d25ddda8..ab676a00 100644 --- a/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html +++ b/projects/ucap-webmessenger-ui-chat/src/lib/components/message-box/mass-translation.component.html @@ -2,7 +2,7 @@