mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #5109 from ErisDS/issue-5064
Remove duplicate subdirectory in RSS urls
This commit is contained in:
commit
920856c479
1 changed files with 5 additions and 0 deletions
|
@ -562,6 +562,11 @@ frontendControllers = {
|
||||||
// as the base URL, otherwise use the post's URL.
|
// as the base URL, otherwise use the post's URL.
|
||||||
baseUrl = attributeValue[0] === '/' ? siteUrl : item.url;
|
baseUrl = attributeValue[0] === '/' ? siteUrl : item.url;
|
||||||
|
|
||||||
|
// prevent double subdirectoreis
|
||||||
|
if (attributeValue.indexOf(config.paths.subdir) === 0) {
|
||||||
|
attributeValue = attributeValue.replace(config.paths.subdir, '');
|
||||||
|
}
|
||||||
|
|
||||||
// prevent double slashes
|
// prevent double slashes
|
||||||
if (baseUrl.slice(-1) === '/' && attributeValue[0] === '/') {
|
if (baseUrl.slice(-1) === '/' && attributeValue[0] === '/') {
|
||||||
attributeValue = attributeValue.substr(1);
|
attributeValue = attributeValue.substr(1);
|
||||||
|
|
Loading…
Reference in a new issue