A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dotnet/aspnetcore/issues/2655 below:

Encoding a slash as %2F in URI produces unexpected escaped character in route value · Issue #2655 · dotnet/aspnetcore · GitHub

From @epsitec on Saturday, December 2, 2017 11:46:30 PM

I am using RouteBuilder.MapGet() with this pattern:

and I need to be able to pass it a town name which contains a / (such as Belmont/Lausanne) - which is done by using the address/1092/Belmont%2FLausanne. The routing works, however, the route value for town is returned with the string Belmont%2FLausanne.

If I use %25 or other characters which need to be escaped in the URI, they get automatically decoded by the router and returned as their corresponding characters in the route value. The only exception seems to be %2F.

In #363 someone suggested to use a Replace("%2F", "/") but this is just an ugly hack, because it would produce incorrect output for an URI containing %25 followed by 2F ("%252F" should map to "%2F" but with the hack, it would be changed to "/").

Copied from original issue: aspnet/Routing#502


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4