0

I have a hyperlink in my page as below,

<a href="../metrics/viewScLogFile.action?testSetIp=192.20.199.58&amp;sc_location=/home/softtest/features/st5.0/ver1/REF&amp;file=917.b.0+10digs.ref&amp;testSetId=3">917.b.0+10digs.ref</a>

when I click on the link, i am logging all the query params in server side, all param values are shown properly except file param which file=917.b.0+10digs.ref.

This file param is skipping the special character '+' when I log this value (prints as 917.b.0 10digs.ref in logs).

Because of this my functionality fails, how to get param value(in this case file name) as it is without skipping special charactes.

Any suggestions on this would be great. Let me know if i am missing any info.

Manjunath D R
  • 371
  • 2
  • 8
  • 1
    or this [one](http://stackoverflow.com/questions/75980/best-practice-escape-or-encodeuri-encodeuricomponent), in short - please try encodeUriComponent JS method to encode this parameter – udalmik Jul 08 '14 at 07:23
  • 1
    + will be translated to space in URL. to avoid that you can use %2B instead of + or use some proper encoding method like http://stackoverflow.com/questions/4571346/how-to-encode-url-to-avoid-special-characters-in-java – Blue Ocean Jul 08 '14 at 07:27
  • Thanks for both mudalov and Blue Ocean. – Manjunath D R Jul 08 '14 at 07:41

0 Answers0