@bbl-digital/snorre 4.2.50 → 4.2.52

Sign up to get free protection for your applications and to get access to all the features.
package/dist/bundle.js CHANGED
@@ -27541,7 +27541,7 @@
27541
27541
  secondary,
27542
27542
  size,
27543
27543
  text,
27544
- sanitize = false,
27544
+ sanitize = true,
27545
27545
  sanitizeOptions,
27546
27546
  whiteSpace
27547
27547
  }) => {
@@ -40275,8 +40275,9 @@ to {top: 100vh;}
40275
40275
  }
40276
40276
  };
40277
40277
  const formatOutputHtml = (0, _react.useCallback)(html => {
40278
- const replaceParagraphWithBreaks = html.replace(/<p[^>]*?><\/p>/g, '<br />');
40279
- return replaceParagraphWithBreaks;
40278
+ let formattedHtml = html.replace(/<p[^>]*?><\/p>/g, '<br />');
40279
+ formattedHtml = formattedHtml.replace(/&nbsp;/g, ' ');
40280
+ return formattedHtml;
40280
40281
  }, []);
40281
40282
  const handleChange = (0, _react.useCallback)(quill => {
40282
40283
  if (!quill) return;
@@ -19,7 +19,7 @@ const Html = ({
19
19
  secondary,
20
20
  size,
21
21
  text,
22
- sanitize = false,
22
+ sanitize = true,
23
23
  sanitizeOptions,
24
24
  whiteSpace
25
25
  }) => {
@@ -129,8 +129,9 @@ const QuillEditor = ({
129
129
  }
130
130
  };
131
131
  const formatOutputHtml = (0, _react.useCallback)(html => {
132
- const replaceParagraphWithBreaks = html.replace(/<p[^>]*?><\/p>/g, '<br />');
133
- return replaceParagraphWithBreaks;
132
+ let formattedHtml = html.replace(/<p[^>]*?><\/p>/g, '<br />');
133
+ formattedHtml = formattedHtml.replace(/&nbsp;/g, ' ');
134
+ return formattedHtml;
134
135
  }, []);
135
136
  const handleChange = (0, _react.useCallback)(quill => {
136
137
  if (!quill) return;
@@ -19,7 +19,7 @@ const Html = ({
19
19
  secondary,
20
20
  size,
21
21
  text,
22
- sanitize = false,
22
+ sanitize = true,
23
23
  sanitizeOptions,
24
24
  whiteSpace
25
25
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAW3C,OAAO,2BAA2B,CAAA;AAkClC,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAoR3C,CAAA;AAED,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/QuillEditor/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAW3C,OAAO,2BAA2B,CAAA;AAkClC,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqR3C,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -129,8 +129,9 @@ const QuillEditor = ({
129
129
  }
130
130
  };
131
131
  const formatOutputHtml = (0, _react.useCallback)(html => {
132
- const replaceParagraphWithBreaks = html.replace(/<p[^>]*?><\/p>/g, '<br />');
133
- return replaceParagraphWithBreaks;
132
+ let formattedHtml = html.replace(/<p[^>]*?><\/p>/g, '<br />');
133
+ formattedHtml = formattedHtml.replace(/&nbsp;/g, ' ');
134
+ return formattedHtml;
134
135
  }, []);
135
136
  const handleChange = (0, _react.useCallback)(quill => {
136
137
  if (!quill) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.2.50",
3
+ "version": "4.2.52",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",