0
Fork 0
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:
Hannah Wolfe 2015-04-05 23:30:22 +01:00
parent 880c911d22
commit 527e4eed06

View file

@ -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);