public Rendering render(WikiLinkNode node) {\r
try {\r
String fsc = GitBlit.getString(Keys.web.forwardSlashCharacter, "/");\r
- String path = URLEncoder.encode(node.getText().replace(' ', '-'), "UTF-8").replace("%2F", fsc);\r
+ // adjust the request path\r
+ String path = node.getText().charAt(0) == '/' ? node.getText().substring(1) : node.getText();\r
+ path = URLEncoder.encode(path.replace(' ', '-'), "UTF-8").replace("%2F", fsc);\r
\r
// extract document name\r
- String name = node.getText();\r
+ String name = node.getText().replace('_', ' ');\r
if (name.indexOf('/') > -1) {\r
name = name.substring(name.lastIndexOf('/') + 1);\r
}\r