From 0aa82d875ac55b1014e07b653a335b60a1398edc Mon Sep 17 00:00:00 2001 From: HANG ZHOU Date: Thu, 5 Mar 2020 14:46:17 +0000 Subject: [PATCH] Update input.go --- context/input.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context/input.go b/context/input.go index 2c53c601..23f5e7d2 100644 --- a/context/input.go +++ b/context/input.go @@ -83,7 +83,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. @@ -275,7 +275,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 ""