Add escape parsing to ParseURL

This commit is contained in:
ArsenArsen 2018-01-01 20:49:35 +01:00
parent a06a1f4925
commit ed9afe461b
No known key found for this signature in database
GPG key ID: 683D2F43B0CA4BD2

View file

@ -244,10 +244,11 @@ public string ParseURL(string url, bool output)
bool syntaxStart = false;
int syntaxStartIndex = 0;
bool escape = false;
for (int i = 0; i < url.Length; i++)
{
if (url[i] == '$')
if (url[i] == '$' && !escape)
{
if (!syntaxStart)
{
@ -271,6 +272,10 @@ public string ParseURL(string url, bool output)
}
}
}
else if(url[i] == '\\')
{
escape = true;
}
else if (!syntaxStart)
{
result.Append(url[i]);