removed use of strip_tags and using String library instead

This commit is contained in:
Julian Lam
2013-12-26 21:10:26 -05:00
parent 2c6bf93eb5
commit b52782deb8
9 changed files with 15 additions and 31 deletions

View File

@@ -2,6 +2,7 @@ var async = require('async'),
gravatar = require('gravatar'),
nconf = require('nconf'),
validator = require('validator'),
S = require('string'),
db = require('./database'),
posts = require('./posts'),
@@ -826,7 +827,7 @@ var async = require('async'),
if (postData.content) {
stripped = postData.content.replace(/>.+\n\n/, '');
postTools.parse(stripped, function(err, stripped) {
returnObj.text = utils.strip_tags(stripped);
returnObj.text = S(stripped).stripTags().s;
callback(null, returnObj);
});
} else {