@magento/pagebuilder 9.3.2 → 9.3.3-alpha.13

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,8 +1,16 @@
1
+ import DOMPurify from 'dompurify';
1
2
  import { getAdvanced } from '../../utils';
2
3
 
3
4
  export default node => {
5
+ // Get the raw HTML content from the first child node
6
+ const rawHTML = node.childNodes[0] ? node.childNodes[0].innerHTML : '';
7
+
8
+ // Sanitize the raw HTML using DOMPurify
9
+ const sanitizedHTML = DOMPurify.sanitize(rawHTML);
10
+
4
11
  return {
5
- richContent: node.childNodes[0] ? node.childNodes[0].innerHTML : '',
12
+ // Return the sanitized HTML content, along with the result from getAdvanced
13
+ richContent: sanitizedHTML,
6
14
  ...getAdvanced(node)
7
15
  };
8
16
  };
@@ -125,7 +125,7 @@ ul.navigation::-webkit-scrollbar {
125
125
 
126
126
  .panel {
127
127
  min-height: inherit;
128
- composes: !empty_hidden from global;
128
+ composes: empty_hidden from global;
129
129
  }
130
130
 
131
131
  .panelSelected {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magento/pagebuilder",
3
- "version": "9.3.2",
3
+ "version": "9.3.3-alpha.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,9 +34,9 @@
34
34
  "homepage": "https://github.com/magento/pwa-studio/tree/main/packages/pagebuilder#readme",
35
35
  "dependencies": {},
36
36
  "devDependencies": {
37
- "@magento/peregrine": "~14.4.1",
38
- "@magento/pwa-buildpack": "~11.5.3",
39
- "@magento/venia-ui": "~11.5.0",
37
+ "@magento/peregrine": "14.5.1-alpha.13",
38
+ "@magento/pwa-buildpack": "11.5.4-alpha.13",
39
+ "@magento/venia-ui": "11.6.0-alpha.13",
40
40
  "@storybook/react": "~6.3.7",
41
41
  "jarallax": "~1.11.1",
42
42
  "load-google-maps-api": "~2.0.1",
@@ -50,9 +50,9 @@
50
50
  "peerDependencies": {
51
51
  "@apollo/client": "~3.5.0",
52
52
  "@magento/babel-preset-peregrine": "~1.3.3",
53
- "@magento/peregrine": "~14.4.1",
54
- "@magento/pwa-buildpack": "~11.5.3",
55
- "@magento/venia-ui": "~11.5.0",
53
+ "@magento/peregrine": "14.5.1-alpha.13",
54
+ "@magento/pwa-buildpack": "11.5.4-alpha.13",
55
+ "@magento/venia-ui": "11.6.0-alpha.13",
56
56
  "jarallax": "~1.11.1",
57
57
  "load-google-maps-api": "~2.0.1",
58
58
  "lodash.escape": "~4.0.1",