improve regex

This commit is contained in:
Pilzinsel64
2025-11-21 10:18:02 +01:00
parent 666126808d
commit f72ddd71e9
2 changed files with 2 additions and 2 deletions

View File

@@ -268,7 +268,7 @@ public class ApiServer : IApiServer
if (endBreacket != -1) if (endBreacket != -1)
{ {
var name = url.Substring(nextBreacket + 1, endBreacket - nextBreacket - 1); var name = url.Substring(nextBreacket + 1, endBreacket - nextBreacket - 1);
const string regex = "[A-Za-z0-9%]+"; const string regex = "[A-Za-z0-9%_.-]+";
url = url.Replace(url.Substring(nextBreacket, endBreacket - nextBreacket + 1), regex); url = url.Replace(url.Substring(nextBreacket, endBreacket - nextBreacket + 1), regex);
var index = url[..(nextBreacket + 1)].Split('/').Length - 1; var index = url[..(nextBreacket + 1)].Split('/').Length - 1;

View File

@@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Version>2.10.1</Version> <Version>2.10.2</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>