mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Remove duplicate subdirectory in RSS urls
fixes #5064 - this is a quick and dirty fix for now
This commit is contained in:
parent
880c911d22
commit
527e4eed06
1 changed files with 5 additions and 0 deletions
|
@ -562,6 +562,11 @@ frontendControllers = {
|
|||
// as the base URL, otherwise use the post's 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
|
||||
if (baseUrl.slice(-1) === '/' && attributeValue[0] === '/') {
|
||||
attributeValue = attributeValue.substr(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue