From 91fcabfb47311b4f902b1e3ae3a3da4abe4c05b8 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 25 Oct 2013 08:56:23 -0400 Subject: Respect web.forwardSlashCharacter in intra-Markdown links (issue-324) Change-Id: I27482c223a3daa0d10f37e88cd80481c6e1eb4b0 --- src/main/java/com/gitblit/wicket/pages/RepositoryPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 3b1d296b..157f9e7c 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -660,7 +660,8 @@ public abstract class RepositoryPage extends RootPage { @Override public Rendering render(WikiLinkNode node) { try { - String path = URLEncoder.encode(node.getText().replace(' ', '-'), "UTF-8"); + String fsc = GitBlit.getString(Keys.web.forwardSlashCharacter, "/"); + String path = URLEncoder.encode(node.getText().replace(' ', '-'), "UTF-8").replace("%2F", fsc); String name = node.getText(); if (name.indexOf('/') > -1) { name = name.substring(name.lastIndexOf('/') + 1); -- cgit v1.2.3