SEBWIN-414: Ensured query string parameter is correctly appended to start URL.
This commit is contained in:
parent
50e943e8a8
commit
3a23cec2c2
1 changed files with 8 additions and 1 deletions
|
@ -207,7 +207,14 @@ namespace SafeExamBrowser.Browser
|
||||||
|
|
||||||
if (settings.UseQueryParameter)
|
if (settings.UseQueryParameter)
|
||||||
{
|
{
|
||||||
url = $"{url}{settings.StartUrlQuery}";
|
if (url.Contains("?") && settings.StartUrlQuery?.Length > 1 && Uri.TryCreate(url, UriKind.Absolute, out var uri))
|
||||||
|
{
|
||||||
|
url = url.Replace(uri.Query, $"{uri.Query}&{settings.StartUrlQuery.Substring(1)}");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
url = $"{url}{settings.StartUrlQuery}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
|
|
Loading…
Reference in a new issue