From c6b9193940e5625cfdca6f496e363287cc177fbd Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Wed, 9 Oct 2019 20:49:51 +0100 Subject: [PATCH] Fixed duplicated host in URLs returned from API when saved as relative no issue - Ghost passes full urls through to the `url-utils` methods as the `itemPath` argument when performing relative->absolute transforms - `url-utils` was not handling this correctly for page-relative urls (no leading slash) where it resulted in duplicate hosts such as http://mysite.com/http://mysite.com/item-path/relative-path - bumps version of @tryghost/url-utils to a fixed version --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 60cd7fdfad..d2060cc2f5 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@tryghost/members-ssr": "0.7.0", "@tryghost/social-urls": "0.1.2", "@tryghost/string": "^0.1.3", - "@tryghost/url-utils": "0.6.2", + "@tryghost/url-utils": "0.6.3", "ajv": "6.10.2", "amperize": "0.6.0", "analytics-node": "3.3.0", diff --git a/yarn.lock b/yarn.lock index 3e82777679..807349bbb0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -297,10 +297,10 @@ dependencies: unidecode "^0.1.8" -"@tryghost/url-utils@0.6.2": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-0.6.2.tgz#136901c835884259619ba93cc737e1a683f02aa3" - integrity sha512-/ksyMkUI3KTFpSSawqqEhjv6Sur5+67Cn49up0YuQzIgHMh9u2rKyoAUzOAxNnMn3k/dq1LfzWtAE4al2ld0NA== +"@tryghost/url-utils@0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/@tryghost/url-utils/-/url-utils-0.6.3.tgz#4bff3b43afa43f878593d24119810f739950630b" + integrity sha512-BLCBFnMmLjkRzps/ou5FboAVIrlcs4FicQAU8aB53xXjW6Uf2gpL5e3huzvUyOMWW9eN6YkSqxG1k870te+qjA== dependencies: cheerio "0.22.0" moment "2.24.0"