From d5477c14eb6b6050b98f890b487ed19734c2e686 Mon Sep 17 00:00:00 2001 From: James Moger Date: Wed, 22 Aug 2012 21:35:29 -0400 Subject: [PATCH] Fixed generated urls in RSS feeds for grouped repositories --- docs/04_releases.mkd | 1 + src/com/gitblit/SyndicationServlet.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd index 43cce71b..fc56876a 100644 --- a/docs/04_releases.mkd +++ b/docs/04_releases.mkd @@ -12,6 +12,7 @@ If you are updating from an earlier release AND you have indexed branches with t #### fixes - Fixed generated urls in Groovy *sendmail* hook script for grouped repositories +- Fixed generated urls in RSS feeds for grouped repositories - Eliminated an unnecessary reopsitory enumeration call on the root page which should result in faster page loads (issue 103) - Gitblit could not delete a Lucene index in a working copy on index upgrade - Do not index submodule links (issue 119) diff --git a/src/com/gitblit/SyndicationServlet.java b/src/com/gitblit/SyndicationServlet.java index f9ae4e6d..81cfb768 100644 --- a/src/com/gitblit/SyndicationServlet.java +++ b/src/com/gitblit/SyndicationServlet.java @@ -181,13 +181,14 @@ public class SyndicationServlet extends HttpServlet { urlPattern = "{0}/commit/?r={1}&h={2}"; } String gitblitUrl = HttpUtils.getGitblitURL(request); + char fsc = GitBlit.getChar(Keys.web.forwardSlashCharacter, '/'); // convert RevCommit to SyndicatedEntryModel for (RevCommit commit : commits) { FeedEntryModel entry = new FeedEntryModel(); entry.title = commit.getShortMessage(); entry.author = commit.getAuthorIdent().getName(); entry.link = MessageFormat.format(urlPattern, gitblitUrl, - StringUtils.encodeURL(model.name), commit.getName()); + StringUtils.encodeURL(model.name.replace('/', fsc)), commit.getName()); entry.published = commit.getCommitterIdent().getWhen(); entry.contentType = "text/html"; String message = GitBlit.self().processCommitMessage(model.name, -- 2.39.5