Merge remote-tracking branch 'upstream/master' into clicks-by-device-type
This commit is contained in:
commit
10dd23fee4
9 changed files with 66 additions and 16 deletions
|
@ -655,6 +655,9 @@ module.exports.create = (campaign, opts, callback) => {
|
|||
Object.keys(campaign).forEach(key => {
|
||||
let value = typeof campaign[key] === 'number' ? campaign[key] : (campaign[key] || '').toString().trim();
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'description') {
|
||||
value = tools.purifyHTML(value);
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0 && keys.indexOf(key) < 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
@ -827,6 +830,9 @@ module.exports.update = (id, updates, callback) => {
|
|||
Object.keys(campaign).forEach(key => {
|
||||
let value = typeof campaign[key] === 'number' ? campaign[key] : (campaign[key] || '').toString().trim();
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'description') {
|
||||
value = tools.purifyHTML(value);
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0 && keys.indexOf(key) < 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue