v1.18.x
barisusakli 11 years ago
parent 62dd056faa
commit 7019618863

@ -330,6 +330,14 @@ var async = require('async'),
return obj; return obj;
} }
function stripTags(content) {
if (options.stripTags && content) {
var s = S(content);
return s.stripTags.apply(s, utils.stripTags).s;
}
return content;
}
if (err) { if (err) {
return callback(err); return callback(err);
} }
@ -355,6 +363,7 @@ var async = require('async'),
post.relativeTime = utils.toISOString(post.timestamp); post.relativeTime = utils.toISOString(post.timestamp);
if (!post.content || !options.parse) { if (!post.content || !options.parse) {
post.content = stripTags(post.content);
return next(null, post); return next(null, post);
} }
@ -363,12 +372,7 @@ var async = require('async'),
return next(err); return next(err);
} }
if (options.stripTags && content) { post.content = stripTags(content);
var s = S(content);
post.content = s.stripTags.apply(s, utils.stripTags).s;
} else {
post.content = content;
}
next(null, post); next(null, post);
}); });

Loading…
Cancel
Save