@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.
@@ -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
- return innerHtml.replace(/(.*\s)?<div.*>\s*(<table(?:.|\s)*<\/table>)\s*<\/div>(.*\s)?/g, '$1$2$3');
6262
+ var result = innerHtml.replace(/<div[^>]*>\s*(<table(?:.|\s)*<\/table>)\s*<\/div>/g, '$1');
6263
+ return result;
6266
6264
  });
6267
6265
  }
6268
6266