fix: remove unnecessary escaping
This commit is contained in:
parent
ab4b6be9d7
commit
f270b50972
|
@ -30,16 +30,10 @@ class ChatMessage extends AbstractChatMessage<Props> {
|
|||
})
|
||||
: message.message;
|
||||
|
||||
// replace links and smileys
|
||||
// Strophe already escapes special symbols on sending,
|
||||
// so we escape here only tags to avoid double &
|
||||
const escMessage = messageToDisplay.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/\n/g, '<br/>');
|
||||
const processedMessage = [];
|
||||
|
||||
// content is an array of text and emoji components
|
||||
const content = toArray(escMessage, { className: 'smiley' });
|
||||
const content = toArray(messageToDisplay, { className: 'smiley' });
|
||||
|
||||
content.forEach(i => {
|
||||
if (typeof i === 'string') {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// @flow
|
||||
|
||||
import UIUtil from '../../../modules/UI/util/UIUtil';
|
||||
|
||||
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';
|
||||
import {
|
||||
CONFERENCE_JOINED,
|
||||
|
@ -49,12 +47,10 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
const { conference } = store.getState()['features/base/conference'];
|
||||
|
||||
if (conference) {
|
||||
const escapedMessage = UIUtil.escapeHtml(action.message);
|
||||
|
||||
if (typeof APP !== 'undefined') {
|
||||
APP.API.notifySendingChatMessage(escapedMessage);
|
||||
APP.API.notifySendingChatMessage(action.message);
|
||||
}
|
||||
conference.sendTextMessage(escapedMessage);
|
||||
conference.sendTextMessage(action.message);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue