switch to stdlib url escaping
Signed-off-by: Robin Durner <github@nubenum.de>
This commit is contained in:
parent
beecaca7db
commit
d9c1a01c9b
|
|
@ -8,6 +8,7 @@ package context
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
|
@ -620,7 +621,7 @@ func RepoRefByType(refType RepoRefType) macaron.Handler {
|
||||||
ctx.Redirect(path.Join(
|
ctx.Redirect(path.Join(
|
||||||
setting.AppSubURL,
|
setting.AppSubURL,
|
||||||
path.Dir(ctx.Req.URL.String()),
|
path.Dir(ctx.Req.URL.String()),
|
||||||
strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(ctx.Repo.BranchNameSubURL()),
|
(&url.URL{Path: ctx.Repo.BranchNameSubURL()}).String(),
|
||||||
ctx.Repo.TreePath))
|
ctx.Repo.TreePath))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user