@contentful/field-editor-rich-text 3.4.15 → 3.4.16
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/CHANGELOG.md +6 -0
- package/dist/field-editor-rich-text.cjs.development.js +2 -4
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +2 -4
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +2 -2
|
@@ -6257,12 +6257,10 @@ var sanitizeHTML = function sanitizeHTML(html) {
|
|
|
6257
6257
|
|
|
6258
6258
|
if (doc.querySelector('table')) {
|
|
6259
6259
|
// remove div container from tables
|
|
6260
|
-
// capture groups explained:
|
|
6261
|
-
// 1. and 3. every content/linebreaks before and after the div container
|
|
6262
|
-
// 2. the table inside the container, including content and linebreaks
|
|
6263
6260
|
// The div container including attributes and possible linebreaks inside wil be removed
|
|
6264
6261
|
replacers.unshift(function (innerHtml) {
|
|
6265
|
-
|
|
6262
|
+
var result = innerHtml.replace(/<div[^>]*>\s*(<table(?:.|\s)*<\/table>)\s*<\/div>/g, '$1');
|
|
6263
|
+
return result;
|
|
6266
6264
|
});
|
|
6267
6265
|
}
|
|
6268
6266
|
|