@desynova-digital/components 9.0.11 → 9.0.12

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.
@@ -243,6 +243,19 @@ var DraftInputText = function DraftInputText(_ref) {
243
243
  return match === '<em>' ? '<i>' : '</i>';
244
244
  });
245
245
  };
246
+
247
+ /**
248
+ *
249
+ * @param {string} html the string that is passed to the parent
250
+ * @returns removes the symbols of special character like commas and convert them back to character
251
+ */
252
+
253
+ function decodeHtml(html) {
254
+ var txt = document.createElement('textarea');
255
+ txt.innerHTML = html;
256
+ return txt.value;
257
+ }
258
+
246
259
  /**
247
260
  * this useEffect is used to send value to parent component as soon as editor state gets updated
248
261
  */
@@ -250,6 +263,7 @@ var DraftInputText = function DraftInputText(_ref) {
250
263
  var html = (0, _draftConvert.convertToHTML)(editorState.getCurrentContent());
251
264
  html = removeOuterPTag(html);
252
265
  html = changeEmToI(html);
266
+ html = decodeHtml(html);
253
267
  var obj = {
254
268
  size: contentLength,
255
269
  html: html
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "9.0.11",
3
+ "version": "9.0.12",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "9.0.11",
10
+ "@desynova-digital/tokens": "9.0.12",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },