html-to-gutenberg 4.2.3 → 4.2.4
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/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1523,7 +1523,7 @@ const block = async (
|
|
|
1523
1523
|
css += styles.map((style) => {
|
|
1524
1524
|
return `${style.content}`;
|
|
1525
1525
|
}).join('\n');
|
|
1526
|
-
|
|
1526
|
+
|
|
1527
1527
|
|
|
1528
1528
|
const scriptRegex = /<script[^>]*>([\s\S]*?)<\/script>/gi;
|
|
1529
1529
|
const scriptSrcRegex =
|
|
@@ -1537,9 +1537,9 @@ const block = async (
|
|
|
1537
1537
|
}
|
|
1538
1538
|
return '';
|
|
1539
1539
|
});
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1540
|
+
const $ = cheerio.load(htmlContent, { xmlMode: true, decodeEntities: false });
|
|
1541
|
+
$('head').remove();
|
|
1542
|
+
htmlContent = $.html({ xml: false, decodeEntities: false });
|
|
1543
1543
|
const fetchJsPromises = [];
|
|
1544
1544
|
|
|
1545
1545
|
while ((jsMatch = scriptSrcRegex.exec(htmlContent)) !== null) {
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"types": "index.ts",
|
|
25
25
|
"name": "html-to-gutenberg",
|
|
26
|
-
"version": "4.2.
|
|
26
|
+
"version": "4.2.4",
|
|
27
27
|
"description": "Transform any valid HTML string into fully editable WP Gutenberg blocks in seconds rather than hours.",
|
|
28
28
|
"main": "index.js",
|
|
29
29
|
"directories": {
|