]> source.dussan.org Git - gitblit.git/commitdiff
Respect web.forwardSlashCharacter in intra-Markdown links (issue-324)
authorJames Moger <james.moger@gitblit.com>
Fri, 25 Oct 2013 12:56:23 +0000 (08:56 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 25 Oct 2013 12:56:23 +0000 (08:56 -0400)
Change-Id: I27482c223a3daa0d10f37e88cd80481c6e1eb4b0

src/main/java/com/gitblit/wicket/pages/RepositoryPage.java

index 3b1d296b11d92844585e6a6bdc1a1bf627f197cb..157f9e7c8b1b719fbeb83a7cde751bf92dd66f8a 100644 (file)
@@ -660,7 +660,8 @@ public abstract class RepositoryPage extends RootPage {
                        @Override\r
                        public Rendering render(WikiLinkNode node) {\r
                                try {\r
-                                       String path = URLEncoder.encode(node.getText().replace(' ', '-'), "UTF-8");\r
+                                       String fsc = GitBlit.getString(Keys.web.forwardSlashCharacter, "/");\r
+                                       String path = URLEncoder.encode(node.getText().replace(' ', '-'), "UTF-8").replace("%2F", fsc);\r
                                        String name = node.getText();\r
                                        if (name.indexOf('/') > -1) {\r
                                                name = name.substring(name.lastIndexOf('/') + 1);\r