Merge branch 'master' into custom-forms-mjml
# Conflicts: # lib/tools.js # package.json
This commit is contained in:
commit
b09af60fac
10 changed files with 79 additions and 24 deletions
|
@ -123,6 +123,9 @@ module.exports.create = (list, callback) => {
|
|||
Object.keys(list).forEach(key => {
|
||||
let value = list[key].trim();
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'description') {
|
||||
value = tools.purifyHTML(value);
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
@ -182,6 +185,9 @@ module.exports.update = (id, updates, callback) => {
|
|||
Object.keys(updates).forEach(key => {
|
||||
let value = updates[key].trim();
|
||||
key = tools.toDbKey(key);
|
||||
if (key === 'description') {
|
||||
value = tools.purifyHTML(value);
|
||||
}
|
||||
if (allowedKeys.indexOf(key) >= 0) {
|
||||
keys.push(key);
|
||||
values.push(value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue