0

I am copying part of the string URL from text field and it gets copied properly. However when I add this to URL bar of chrome or firefox or infact a notepad, it adds "%E2%80%8B" after the string. For example

www.localhost.com/token.php?tokenNumber=1234asd%E2%80%8B

Why does this happen and how do I avoid this?

public Text token;
public string myToken;

public void GeneratedURL() {
        myToken = token.text;

        string url = "www.localhost/token.php?tokenNumber=" + myToken;
    }
Jelke
  • 55
  • 6
  • URL's cannot have some characters like spaces. Those characters are encoded. What you are describing is that token getting encoded. For example `%20` is `space`. That is fine. You can get some information in [HttpUtility.UrlEncode](https://learn.microsoft.com/en-us/dotnet/api/system.web.httputility.urlencode?view=net-5.0) – Cleptus Jul 16 '21 at 11:59
  • You have a similar problem like this. https://stackoverflow.com/questions/10342012 – MrMoeinM Jul 16 '21 at 12:13

0 Answers0