Fix tests

v1.18.x
Peter Jaszkowiak 8 years ago
parent 0fe10f5e86
commit e382bca610

@ -5,7 +5,7 @@ var async = require('async');
var os = require('os');
var nconf = require('nconf');
var winston = require('winston');
var validator = require('validator');
var topics = require('../../topics');
var pubsub = require('../../pubsub');

@ -1,7 +1,6 @@
'use strict';
var async = require('async');
var validator = require('validator');
var posts = require('../../posts');
var topics = require('../../topics');

@ -1,7 +1,6 @@
'use strict';
var async = require('async');
var validator = require('validator');
var topics = require('../../topics');
var events = require('../../events');

@ -12,7 +12,7 @@ function escapeTitle(topicData) {
return;
}
if (topicData.title) {
topicData.title = translator.escape(validator.escape(topicData.title));
topicData.title = translator.escape(validator.escape(topicData.title.toString()));
}
if (topicData.titleRaw) {
topicData.titleRaw = translator.escape(topicData.titleRaw);
@ -27,7 +27,7 @@ module.exports = function (Topics) {
}
if (field === 'title') {
value = translator.escape(validator.escape(value));
value = translator.escape(validator.escape(String(value)));
}
callback(null, value);
});

Loading…
Cancel
Save