This commit is contained in:
Benjamin Toby 2026-01-15 07:54:35 +01:00
parent b50e100732
commit 664cb3a3d8
3 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ function grabParsedValue({ value, tableSchema, encryptionKey, encryptionSalt, da
if (typeof newValue == "object" && !newValue) { if (typeof newValue == "object" && !newValue) {
return; return;
} }
const htmlRegex = /<[^>]+>/g; const htmlRegex = /<\/?[a-zA-Z][a-zA-Z0-9-]*(\s[^<>]*)?>/g;
if ((targetFieldSchema === null || targetFieldSchema === void 0 ? void 0 : targetFieldSchema.richText) || String(newValue).match(htmlRegex)) { if ((targetFieldSchema === null || targetFieldSchema === void 0 ? void 0 : targetFieldSchema.richText) || String(newValue).match(htmlRegex)) {
newValue = (0, sanitize_html_1.default)(newValue, sanitizeHtmlOptions_1.default); newValue = (0, sanitize_html_1.default)(newValue, sanitizeHtmlOptions_1.default);
} }

View File

@ -45,7 +45,7 @@ export default function grabParsedValue({
return; return;
} }
const htmlRegex = /<[^>]+>/g; const htmlRegex = /<\/?[a-zA-Z][a-zA-Z0-9-]*(\s[^<>]*)?>/g;
if (targetFieldSchema?.richText || String(newValue).match(htmlRegex)) { if (targetFieldSchema?.richText || String(newValue).match(htmlRegex)) {
newValue = sanitizeHtml(newValue, sanitizeHtmlOptions); newValue = sanitizeHtml(newValue, sanitizeHtmlOptions);

View File

@ -1,6 +1,6 @@
{ {
"name": "@moduletrace/datasquirel", "name": "@moduletrace/datasquirel",
"version": "5.7.28", "version": "5.7.29",
"description": "Cloud-based SQL data management tool", "description": "Cloud-based SQL data management tool",
"main": "dist/index.js", "main": "dist/index.js",
"bin": { "bin": {