I am having an issue with query string. i send an activation link to email that link have a query string for example a user activation token. Her is an example of the link http://localhost:3000/#/activation?activation_code=27kVNlC4ShWuL4pkH3/FhVA==.However when i click on the link the browser automatically modify the query string to be http://localhost:3000/#/activation?activation_code=27kVNlC4ShWuL4pkH3%2FhVAwhich results in encryption error. Any idea how i can get the actual query string. i am using angular as front end and asp.net web API.
Asked
Active
Viewed 73 times
0
MohamedAbbas
- 1,109
- 3
- 15
- 30
3 Answers
1
The activation code you are embedding in your url is using reserved characters. See this question: What is a valid URL query string?
I would suggest you url encode the activation token before appending it to the url.
Community
- 1
- 1
Matt Caton
- 3,413
- 21
- 25
1
You need to URL encode your token. It's using reserved characters.
Don't forget to use encodeURIComponent() to encode all special characters.
Pak
- 1,925
- 20
- 27
0
You can use this:
Server.UrlDecode(activation_code)
Chris Forrence
- 9,860
- 11
- 47
- 62
msnfreaky
- 953
- 8
- 14