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:
commit
8432215cd9
1 changed files with 0 additions and 14 deletions
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue