@@ -185,6 +185,7 @@ func TestTreeWildcard(t *testing.T) {
185185 "/get/abc/123abg/:param" ,
186186 "/get/abc/123abf/:param" ,
187187 "/get/abc/123abfff/:param" ,
188+ "/get/abc/escaped_colon/test\\ :param" ,
188189 }
189190 for _ , route := range routes {
190191 tree .addRoute (route , fakeHandler (route ))
@@ -305,6 +306,7 @@ func TestTreeWildcard(t *testing.T) {
305306 {"/get/abc/123abg/test" , false , "/get/abc/123abg/:param" , Params {Param {Key : "param" , Value : "test" }}},
306307 {"/get/abc/123abf/testss" , false , "/get/abc/123abf/:param" , Params {Param {Key : "param" , Value : "testss" }}},
307308 {"/get/abc/123abfff/te" , false , "/get/abc/123abfff/:param" , Params {Param {Key : "param" , Value : "te" }}},
309+ {"/get/abc/escaped_colon/test\\ :param" , false , "/get/abc/escaped_colon/test\\ :param" , nil },
308310 })
309311
310312 checkPriorities (t , tree )
@@ -407,6 +409,9 @@ func TestTreeWildcardConflict(t *testing.T) {
407409 {"/user_:name" , false },
408410 {"/id:id" , false },
409411 {"/id/:id" , false },
412+ {"/escape/test\\ :d1" , false },
413+ {"/escape/test\\ :d2" , false },
414+ {"/escape/test:param" , false },
410415 }
411416 testRoutes (t , routes )
412417}
0 commit comments