Merge pull request #4093 from sbwalker/dev

fix #4091 - double slash generated for home page path ("/") and urlparameters
This commit is contained in:
Shaun Walker 2024-04-01 15:11:38 -04:00 committed by GitHub
commit 73ad97859c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,8 +80,8 @@ namespace Oqtane.Shared
// add urlparameters to path
if (!string.IsNullOrEmpty(urlparameters))
{
if (urlparameters.StartsWith("/")) urlparameters = urlparameters.Remove(0, 1);
path += $"/{Constants.UrlParametersDelimiter}/{urlparameters}";
if (urlparameters.StartsWith("/")) urlparameters = urlparameters.Substring(1);
path += (path.EndsWith("/") ? "" : "/") + $"{Constants.UrlParametersDelimiter}/{urlparameters}";
}
// build url