Skip to content

Node.js based forum software built for the modern web

removed sanitisation of chat message body, as messages are "parsed as a post" now.

Julian Lam078d76a11b5f
diff --git a/src/socket.io/modules.js b/src/socket.io/modules.js
index 8745efc72a..a7ff0a9dfd 100644
--- a/src/socket.io/modules.js
+++ b/src/socket.io/modules.js
@@ -148,8 +148,6 @@ SocketModules.chats.send = function(socket, data, callback) {
return;
}
- var msg = S(data.message).stripTags().s;
-
var now = Date.now();
socket.lastChatMessageTime = socket.lastChatMessageTime || 0;
@@ -177,7 +175,7 @@ SocketModules.chats.send = function(socket, data, callback) {
return callback(err || new Error('[[error:chat-restricted]]'));
}
- Messaging.addMessage(socket.uid, touid, msg, function(err, message) {
+ Messaging.addMessage(socket.uid, touid, data.message, function(err, message) {
if (err) {
return callback(err);
}