0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00

Merge pull request #4970 from felixrieseberg/iss4888-2

RSS: Don't add trailing '/' to post image
This commit is contained in:
Hannah Wolfe 2015-03-03 17:59:11 +00:00
commit 8432215cd9

View file

@ -561,20 +561,6 @@ frontendControllers = {
attributeValue = attributeValue.substr(1);
}
// make sure URL has a trailing slash
try {
parsed = url.parse(attributeValue);
if (parsed.pathname && parsed.pathname.slice(-1) !== '/') {
parsed.pathname += '/';
attributeValue = url.format(parsed);
}
} catch (e) {
// if the URL we've built cannot be parsed, fall back to the unprocessed URL
return;
}
attributeValue = baseUrl + attributeValue;
el.attr(attributeName, attributeValue);
});