Updates
This commit is contained in:
parent
6f6759e74e
commit
e250dfc105
@ -2,7 +2,6 @@
|
||||
|
||||
const sanitizeHtml = require("sanitize-html");
|
||||
const sanitizeHtmlOptions = require("../html/sanitizeHtmlOptions");
|
||||
const updateDb = require("./updateDbEntry");
|
||||
const updateDbEntry = require("./updateDbEntry");
|
||||
const _ = require("lodash");
|
||||
const DB_HANDLER = require("../../../utils/backend/global-db/DB_HANDLER");
|
||||
@ -160,7 +159,9 @@ async function addDbEntry({
|
||||
console.log("DSQL: Encrypted value =>", value);
|
||||
}
|
||||
|
||||
if (targetFieldSchema?.richText) {
|
||||
const htmlRegex = /<[^>]+>/g;
|
||||
|
||||
if (targetFieldSchema?.richText || String(value).match(htmlRegex)) {
|
||||
value = sanitizeHtml(value, sanitizeHtmlOptions);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,9 @@ async function updateDbEntry({
|
||||
|
||||
if (value == null || value == undefined) continue;
|
||||
|
||||
if (targetFieldSchema?.richText) {
|
||||
const htmlRegex = /<[^>]+>/g;
|
||||
|
||||
if (targetFieldSchema?.richText || String(value).match(htmlRegex)) {
|
||||
value = sanitizeHtml(value, sanitizeHtmlOptions);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "2.9.8",
|
||||
"version": "2.9.9",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user