|
|
@ -8,7 +8,7 @@ var async = require('async'),
|
|
|
|
meta = require('../meta'),
|
|
|
|
meta = require('../meta'),
|
|
|
|
websockets = require('../socket.io'),
|
|
|
|
websockets = require('../socket.io'),
|
|
|
|
postTools = require('../postTools'),
|
|
|
|
postTools = require('../postTools'),
|
|
|
|
plugins = require('../plugins')
|
|
|
|
plugins = require('../plugins');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function(Posts) {
|
|
|
|
module.exports = function(Posts) {
|
|
|
@ -61,6 +61,7 @@ module.exports = function(Posts) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
userData.custom_profile_info = results.customProfileInfo.profile;
|
|
|
|
userData.custom_profile_info = results.customProfileInfo.profile;
|
|
|
|
|
|
|
|
userData.signature = sanitizeSignature(userData.signature);
|
|
|
|
|
|
|
|
|
|
|
|
plugins.fireHook('filter:posts.modifyUserInfo', userData, next);
|
|
|
|
plugins.fireHook('filter:posts.modifyUserInfo', userData, next);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -105,3 +106,18 @@ module.exports = function(Posts) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function sanitizeSignature(signature) {
|
|
|
|
|
|
|
|
var string = require('string')(signature),
|
|
|
|
|
|
|
|
tagsToStrip = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (parseInt(meta.config['signatures:disableLinks'], 10) === 1) {
|
|
|
|
|
|
|
|
tagsToStrip.push('a');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (parseInt(meta.config['signatures:disableImages'], 10) === 1) {
|
|
|
|
|
|
|
|
tagsToStrip.push('img');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return tagsToStrip.length ? string.stripTags.apply(string, tagsToStrip).s : signature;
|
|
|
|
|
|
|
|
}
|