@@ -246,7 +246,7 @@ public function addPlaceholder($placeholder, ?string $pattern = null): RouteColl
246
246
*/
247
247
public function setDefaultNamespace (string $ value ): RouteCollectionInterface
248
248
{
249
- $ this ->defaultNamespace = filter_var ( $ value, FILTER_SANITIZE_STRING );
249
+ $ this ->defaultNamespace = esc ( strip_tags ( $ value) );
250
250
$ this ->defaultNamespace = rtrim ($ this ->defaultNamespace , '\\' ) . '\\' ;
251
251
252
252
return $ this ;
@@ -258,7 +258,7 @@ public function setDefaultNamespace(string $value): RouteCollectionInterface
258
258
*/
259
259
public function setDefaultController (string $ value ): RouteCollectionInterface
260
260
{
261
- $ this ->defaultController = filter_var ( $ value, FILTER_SANITIZE_STRING );
261
+ $ this ->defaultController = esc ( strip_tags ( $ value) );
262
262
263
263
return $ this ;
264
264
}
@@ -269,7 +269,7 @@ public function setDefaultController(string $value): RouteCollectionInterface
269
269
*/
270
270
public function setDefaultMethod (string $ value ): RouteCollectionInterface
271
271
{
272
- $ this ->defaultMethod = filter_var ( $ value, FILTER_SANITIZE_STRING );
272
+ $ this ->defaultMethod = esc ( strip_tags ( $ value) );
273
273
274
274
return $ this ;
275
275
}
@@ -1090,7 +1090,7 @@ protected function create(string $verb, string $from, $to, ?array $options = nul
1090
1090
$ overwrite = false ;
1091
1091
$ prefix = $ this ->group === null ? '' : $ this ->group . '/ ' ;
1092
1092
1093
- $ from = filter_var ( $ prefix . $ from, FILTER_SANITIZE_STRING );
1093
+ $ from = esc ( strip_tags ( $ prefix . $ from) );
1094
1094
1095
1095
// While we want to add a route within a group of '/',
1096
1096
// it doesn't work with matching, so remove them...
0 commit comments