@donotdev/crud 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Sanitize HTML by stripping script tags, event handlers, and javascript: URIs.
3
- * Lightweight alternative to DOMPurify for trusted-but-verify scenarios.
2
+ * Sanitize HTML using DOMPurify handles all known XSS vectors including
3
+ * malformed tags, event handlers, javascript: URIs, data: URIs, SVG payloads,
4
+ * CSS injection, and HTML entity encoding bypasses.
4
5
  */
5
6
  export declare function sanitizeHtml(html: string): string;
6
7
  //# sourceMappingURL=sanitizeHtml.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeHtml.d.ts","sourceRoot":"","sources":["../../src/utils/sanitizeHtml.ts"],"names":[],"mappings":"AAiBA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMjD"}
1
+ {"version":3,"file":"sanitizeHtml.d.ts","sourceRoot":"","sources":["../../src/utils/sanitizeHtml.ts"],"names":[],"mappings":"AAaA;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD"}
@@ -1 +1 @@
1
- const c=/<script[\s\S]*?<\/script>/gi,r=/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,t=/\s+(?:xlink:)?href\s*=\s*["']\s*javascript:[^"']*["']/gi,e=/\s+src\s*=\s*["']\s*javascript:[^"']*["']/gi;function i(s){return s.replace(c,"").replace(r,"").replace(t,"").replace(e,"")}export{i as sanitizeHtml};
1
+ import t from"dompurify";function n(i){return t.sanitize(i)}export{n as sanitizeHtml};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/crud",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -54,8 +54,9 @@
54
54
  "@dnd-kit/sortable": "^10.0.0",
55
55
  "@dnd-kit/utilities": "^3.2.2",
56
56
  "@donotdev/components": "^0.0.27",
57
- "@donotdev/core": "^0.0.36",
57
+ "@donotdev/core": "^0.0.37",
58
58
  "@hookform/resolvers": "^5.2.2",
59
+ "dompurify": "^3.3.2",
59
60
  "react-easy-crop": "^5.5.6"
60
61
  },
61
62
  "peerDependencies": {