@tryghost/mg-linkfixer 0.5.14 → 0.5.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/lib/LinkFixer.js +4 -1
- package/package.json +4 -4
package/lib/LinkFixer.js
CHANGED
|
@@ -112,7 +112,10 @@ export default class LinkFixer {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
async processHTML(html) {
|
|
115
|
-
let $ = cheerio.load(html
|
|
115
|
+
let $ = cheerio.load(html, {
|
|
116
|
+
decodeEntities: false,
|
|
117
|
+
scriptingEnabled: false
|
|
118
|
+
}, false); // This `false` is `isDocument`. If `true`, <html>, <head>, and <body> elements are introduced
|
|
116
119
|
|
|
117
120
|
let links = $('a').map(async (i, el) => {
|
|
118
121
|
let href = $(el).attr('href');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryghost/mg-linkfixer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.16",
|
|
4
4
|
"repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-linkfixer",
|
|
5
5
|
"author": "Ghost Foundation",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@tryghost/listr-smart-renderer": "^0.5.12",
|
|
24
|
-
"eslint": "8.
|
|
24
|
+
"eslint": "8.55.0",
|
|
25
25
|
"jest": "29.7.0",
|
|
26
26
|
"jest-extended": "4.0.2",
|
|
27
27
|
"listr": "0.14.3"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"cheerio": "1.0.0-rc.
|
|
30
|
+
"cheerio": "1.0.0-rc.12",
|
|
31
31
|
"lodash": "4.17.21"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "e91603ed4e431bba60521d63a070e397d2ccee2f"
|
|
34
34
|
}
|