Fixed HTML templates for custom JSON fields #192
This commit is contained in:
parent
cec227d688
commit
5aa6dff743
2 changed files with 11 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
let db = require('../db');
|
||||
let shortid = require('shortid');
|
||||
let striptags = require('striptags');
|
||||
let tools = require('../tools');
|
||||
let helpers = require('../helpers');
|
||||
let fields = require('./fields');
|
||||
|
@ -136,6 +137,8 @@ module.exports.insert = (listId, meta, subscriptionData, callback) => {
|
|||
values.push(field.value);
|
||||
});
|
||||
|
||||
values = values.map(v => typeof v === 'string' ? striptags(v) : v);
|
||||
|
||||
db.getConnection((err, connection) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
@ -420,6 +423,8 @@ module.exports.update = (listId, cid, updates, allowEmail, callback) => {
|
|||
return callback(null, false);
|
||||
}
|
||||
|
||||
values = values.map(v => typeof v === 'string' ? striptags(v) : v);
|
||||
|
||||
db.getConnection((err, connection) => {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue