@descope/flow-components 3.27.5 → 3.27.6

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.
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.27.5",
8
+ "buildVersion": "3.27.6",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
@@ -5,7 +5,7 @@
5
5
  "name": "flowComponents",
6
6
  "type": "app",
7
7
  "buildInfo": {
8
- "buildVersion": "3.27.5",
8
+ "buildVersion": "3.27.6",
9
9
  "buildName": "@descope/flow-components"
10
10
  },
11
11
  "remoteEntry": {
package/dist/index.cjs.js CHANGED
@@ -83983,6 +83983,16 @@ function requireIndex_cjs () {
83983
83983
 
83984
83984
  const componentName$1s = getComponentName('enriched-text');
83985
83985
 
83986
+ const sanitizeConfig = {
83987
+ ADD_ATTR: ['target'],
83988
+ // Same scheme rule as markdown-it's link check, so custom-scheme links
83989
+ // (myapp://, slack://) keep working; DOMPurify's default list strips them.
83990
+ // `i` because markdown-it lowercases the URL before testing and DOMPurify does not.
83991
+ ALLOWED_URI_REGEXP:
83992
+ /^(?!(?:vbscript|javascript|file|data):)|^data:image\/(?:gif|png|jpeg|webp);/i,
83993
+ FORBID_TAGS: ['form', 'input', 'button', 'textarea', 'select', 'style'],
83994
+ };
83995
+
83986
83996
  class EnrichedText extends createBaseClass$1({
83987
83997
  componentName: componentName$1s,
83988
83998
  baseSelector: ':host > div',
@@ -84178,8 +84188,10 @@ function requireIndex_cjs () {
84178
84188
  console.warn('Not parsing invalid markdown token');
84179
84189
  }
84180
84190
 
84191
+ html = DOMPurify.sanitize(html, sanitizeConfig);
84192
+
84181
84193
  this.contentNode.innerHTML = html;
84182
- this.contentNode.firstChild?.setAttribute('part', 'content');
84194
+ this.contentNode.firstElementChild?.setAttribute('part', 'content');
84183
84195
  }
84184
84196
 
84185
84197
  onReadOnlyChange(isReadOnly) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/flow-components",
3
- "version": "3.27.5",
3
+ "version": "3.27.6",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -98,7 +98,7 @@
98
98
  "webpack-subresource-integrity": "5.2.0-rc.1"
99
99
  },
100
100
  "dependencies": {
101
- "@descope/web-components-ui": "3.27.5"
101
+ "@descope/web-components-ui": "3.27.6"
102
102
  },
103
103
  "peerDependencies": {
104
104
  "react": ">= 18"