mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-04 13:49:56 +01:00
strip + validate before hook instead
This commit is contained in:
@@ -73,13 +73,14 @@ function canGet(hook, callerUid, uid, callback) {
|
||||
}
|
||||
|
||||
Messaging.parse = function (message, fromuid, uid, roomId, isNew, callback) {
|
||||
message = S(message).stripTags().decodeHTMLEntities().s;
|
||||
message = validator.escape(String(message));
|
||||
|
||||
plugins.fireHook('filter:parse.raw', message, function (err, parsed) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
parsed = S(parsed).stripTags().decodeHTMLEntities().s;
|
||||
parsed = validator.escape(String(parsed));
|
||||
|
||||
var messageData = {
|
||||
message: message,
|
||||
|
||||
Reference in New Issue
Block a user