@capillarytech/cap-ui-utils 1.4.33 → 1.4.34

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capillarytech/cap-ui-utils",
3
- "version": "1.4.33",
3
+ "version": "1.4.34",
4
4
  "description": "Utility functions shared accross all the modules",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -81,8 +81,11 @@ const sanitizeTemplateWithRegexp = (content) => {
81
81
  `(?:<|&lt;|&amp;lt;|amp;lt;)\\s*(${tagsJoined})\\b[\\s\\S]*?(?:\/>|>|&gt;|\/&gt;|&amp;gt;|amp;gt;|\/&amp;gt;|\\Z)`,
82
82
  "gi"
83
83
  );
84
+ // regex to replace the &#39 (ascii html for apostrophe) to the apostrophe for ckeditor content
85
+ const apostropheRegex = new RegExp('&#39;', 'gi');
84
86
 
85
87
  content = content
88
+ .replaceAll(apostropheRegex, '\'')
86
89
  .replace(hexCodeRegex, "")
87
90
  .replace(encodedScriptTagRegex, "")
88
91
  .replace(fullTagRegex, "")