diff --git a/context/input.go b/context/input.go index 2a2bc75e..8bf74b7f 100644 --- a/context/input.go +++ b/context/input.go @@ -89,7 +89,7 @@ func (input *BeegoInput) URI() string { // URL returns request url path (without query string, fragment). func (input *BeegoInput) URL() string { - return input.Context.Request.URL.Path + return input.Context.Request.URL.EscapedPath() } // Site returns base site url as scheme://domain type. @@ -284,7 +284,7 @@ func (input *BeegoInput) ParamsLen() int { func (input *BeegoInput) Param(key string) string { for i, v := range input.pnames { if v == key && i <= len(input.pvalues) { - return input.pvalues[i] + return url.PathEscape(input.pvalues[i]) } } return ""