escape title in post queue

v1.18.x
Barış Soner Uşaklı 6 years ago
parent f51b2e07f4
commit 3e1b007f9f

@ -1,6 +1,7 @@
'use strict'; 'use strict';
var async = require('async'); var async = require('async');
var validator = require('validator');
var db = require('../../database'); var db = require('../../database');
var user = require('../../user'); var user = require('../../user');
@ -81,6 +82,7 @@ function getQueuedPosts(ids, callback) {
async.map(postData, function (postData, next) { async.map(postData, function (postData, next) {
postData.data.rawContent = postData.data.content; postData.data.rawContent = postData.data.content;
postData.data.title = validator.escape(String(postData.data.title));
async.waterfall([ async.waterfall([
function (next) { function (next) {
if (postData.data.cid) { if (postData.data.cid) {

Loading…
Cancel
Save