0

This below snippet: decodeURIComponent("MAR%2520SE%255EStruc%2520Fin%255EAs-Bad%2520Secies%2BRECH%20LANE%5EEnish")

Answer Given: "MAR%20SE%5EStruc%20Fin%5EAs-Bad%20Secies+RECH LANE^Enish"

I need the entire thing to be decoded right from beginning to end.

Thank you

Charan
  • 35
  • 7

1 Answers1

3

It looks like your string has been encoded twice. %25 is the encode version of %.

So either stop encoding it twice, or call decodeURIComponent twice.

decodeURIComponent( decodeURIComponent("MAR%2520SE%255EStruc%2520Fin%255EAs-Bad%2520Secies%2BRECH%20LANE%5EEnish"))

Chris Phillips
  • 673
  • 5
  • 10
  • I did this but as the url size increase.. I have to keep adding decodeURIComponent – Charan Oct 24 '17 at 22:23
  • `but as the url size increase` show the encoding code – Jaromanda X Oct 24 '17 at 22:25
  • I have to decode the entire value like MARKET%2520SECTOR%255EStructured%2520Finance%255EAsset-Backed%2520Securities%2BRESEARCH%20LANGUAGE%5EEnglish, I want to make this entire string decode and send – Charan Oct 24 '17 at 22:35
  • @Charan Can you show us the code that is having the issues? Are you having problems calling it twice? – Chris Phillips Oct 25 '17 at 20:15