@tryghost/mg-clean-html 0.2.12 → 0.2.14

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.
Files changed (2) hide show
  1. package/lib/process.js +4 -1
  2. package/package.json +5 -5
package/lib/process.js CHANGED
@@ -33,7 +33,7 @@ const cleanHTML = (args) => {
33
33
 
34
34
  const $html = $.load(html, {
35
35
  decodeEntities: false
36
- });
36
+ }, false); // This `false` is `isDocument`. If `true`, <html>, <head>, and <body> elements are introduced
37
37
 
38
38
  // Remove left, center & right text alignment
39
39
  if (opinionated) {
@@ -288,6 +288,9 @@ const cleanHTML = (args) => {
288
288
  // convert HTML back to a string
289
289
  html = $html.html();
290
290
 
291
+ // Remove empty attributes
292
+ html = html.replace(/=""/g, '');
293
+
291
294
  return html;
292
295
  };
293
296
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-clean-html",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-clean-html",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -20,14 +20,14 @@
20
20
  "access": "public"
21
21
  },
22
22
  "devDependencies": {
23
- "eslint": "8.51.0",
23
+ "eslint": "8.54.0",
24
24
  "jest": "29.7.0",
25
25
  "jest-extended": "4.0.2"
26
26
  },
27
27
  "dependencies": {
28
- "cheerio": "0.22.0",
28
+ "cheerio": "1.0.0-rc.12",
29
29
  "escape-string-regexp": "5.0.0",
30
- "style-to-object": "0.4.2"
30
+ "style-to-object": "1.0.5"
31
31
  },
32
- "gitHead": "c865538e1d67fac4fc6f5b53fae5127d164365c8"
32
+ "gitHead": "87eac9f1a90b9e8935ce70d9459db6f8ffec6133"
33
33
  }