mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-07 07:26:05 +12:00
Add escape parsing to ParseURL
This commit is contained in:
parent
a06a1f4925
commit
ed9afe461b
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue