File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 6285
6285
args :
6286
6286
- ' @uri'
6287
6287
input : |
6288
- [1, {"foo": "<div>&'\"()</div>"}]
6288
+ [1, {"foo": "<div>&'\"()+ </div>"}]
6289
6289
expected : |
6290
- "%5B1%2C%7B%22foo%22%3A%22%3Cdiv%3E%26%27%5C%22%28%29%3C%2Fdiv%3E%22%7D%5D"
6290
+ "%5B1%2C%7B%22foo%22%3A%22%3Cdiv%3E%26%27%5C%22%28%29%2B% 3C%2Fdiv%3E%22%7D%5D"
6291
6291
6292
6292
- name : format strings @uri with string interpolation
6293
6293
args :
6301
6301
args :
6302
6302
- ' @urid'
6303
6303
input : |
6304
- "%5B1%2C%7B%22foo%22%3A%22%3Cdiv%3E%26%27%5C%22%28%29%3C%2Fdiv%3E%22%7D%5D"
6304
+ "%5B1%2C%7B%22foo%22%3A%22%3Cdiv%3E%26%27%5C%22%28%29%2B% 3C%2Fdiv%3E%22%7D%5D"
6305
6305
expected : |
6306
- "[1,{\"foo\":\"<div>&'\\\"()</div>\"}]"
6306
+ "[1,{\"foo\":\"<div>&'\\\"()+ </div>\"}]"
6307
6307
6308
6308
- name : format strings @urid error
6309
6309
args :
Original file line number Diff line number Diff line change @@ -884,7 +884,7 @@ func funcToHTML(v any) any {
884
884
func funcToURI (v any ) any {
885
885
switch x := funcToString (v ).(type ) {
886
886
case string :
887
- return url .QueryEscape (x )
887
+ return strings . ReplaceAll ( url .QueryEscape (x ), "+" , "%20" )
888
888
default :
889
889
return x
890
890
}
@@ -893,7 +893,7 @@ func funcToURI(v any) any {
893
893
func funcToURId (v any ) any {
894
894
switch x := funcToString (v ).(type ) {
895
895
case string :
896
- x , err := url .QueryUnescape (x )
896
+ x , err := url .QueryUnescape (strings . ReplaceAll ( x , "+" , "%2B" ) )
897
897
if err != nil {
898
898
return & func0WrapError {"@urid" , v , err }
899
899
}
You can’t perform that action at this time.
0 commit comments