We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0adaefe commit f6de393Copy full SHA for f6de393
1 file changed
tasks/inline-media.js
@@ -400,6 +400,16 @@ const getFullTaskList = (options) => {
400
// Deduplicate, filter out media already on the Ghost site,
401
// and filter by asset domain if specified
402
mediaUrls = [...new Set(mediaUrls)].filter((url) => {
403
+ // Skip malformed URLs (e.g. concatenated URLs like "https://site.comhttps://other.com/...")
404
+ try {
405
+ const parsed = new URL(url);
406
+ if (parsed.hostname.includes('http') || (url.match(/https?:\/\//g) || []).length > 1) {
407
+ return false;
408
+ }
409
+ } catch (e) {
410
411
412
+
413
if (url.startsWith(ctx.siteUrl)) {
414
return false;
415
}
0 commit comments