cf-pagetree-parser 1.0.2 → 1.0.3

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.
@@ -30,11 +30,12 @@ function sanitizeHtml(html) {
30
30
  * ============================================================================
31
31
  */
32
32
 
33
- // Use DOMPurify in browser, simple passthrough on server
34
- // Server-side parsing is from trusted FunnelWind source
35
- let DOMPurify = null;
36
- if (typeof window !== 'undefined') {
37
- import('dompurify').then(mod => { DOMPurify = mod.default; });
33
+ /**
34
+ * Sanitize HTML - passthrough for trusted FunnelWind source content
35
+ */
36
+ function sanitizeHtml(html) {
37
+ if (!html) return '';
38
+ return html;
38
39
  }
39
40
 
40
41
  /**
@@ -4633,10 +4634,9 @@ async function copyPageTreeToClipboard(rootElement = null) {
4633
4634
  // Expose API
4634
4635
  global.CFPageTreeParser = {
4635
4636
  parsePageTree,
4636
- parseElement,
4637
- extractPageSettings,
4637
+ createParseElement,
4638
4638
  exportPageTreeJSON,
4639
- downloadPageTreeJSON,
4639
+ downloadPageTree,
4640
4640
  copyPageTreeToClipboard,
4641
4641
  // Utils
4642
4642
  generateId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cf-pagetree-parser",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Parse FunnelWind HTML to ClickFunnels PageTree JSON",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/utils.js CHANGED
@@ -8,26 +8,12 @@
8
8
  * ============================================================================
9
9
  */
10
10
 
11
- // Use DOMPurify in browser, simple passthrough on server
12
- // Server-side parsing is from trusted FunnelWind source
13
- let DOMPurify = null;
14
- if (typeof window !== 'undefined') {
15
- import('dompurify').then(mod => { DOMPurify = mod.default; });
16
- }
17
-
18
11
  /**
19
- * Sanitize HTML to prevent XSS attacks
20
- * Allows only safe formatting tags for text content
12
+ * Sanitize HTML - passthrough for trusted FunnelWind source content
21
13
  */
22
14
  export function sanitizeHtml(html) {
23
15
  if (!html) return '';
24
- // On server or before DOMPurify loads, return HTML as-is
25
- // (server-side parsing is from trusted FunnelWind source)
26
- if (!DOMPurify) return html;
27
- return DOMPurify.sanitize(html, {
28
- ALLOWED_TAGS: ['b', 'strong', 'i', 'em', 'u', 's', 'strike', 'a', 'br', 'span', 'li'],
29
- ALLOWED_ATTR: ['href', 'target', 'rel', 'style', 'class'],
30
- });
16
+ return html;
31
17
  }
32
18
 
33
19
  /**