generated jscript link and urlencode

G

greg

I know this is more JS problem but this newsgroup is my home!!! :)

in my page i have something like
link.NavigateUrl="javascript:window('some url?tkt=yyy%2kjh')

now contents of tkt is encrypted (in c#) userid
after encryption of course I urlencode

now when the new browser window (after clicking that link) pops up
I see that somehow in the process of cicking off new window
Javascript urldecoded the contents of tkt parameter like instead of %20
putting some slashes etc etc
of course decryption does not work with bad url

What to do?
when I move mouse on the origibal page over that link I see everything is in
order like all
%20s etc are in place
It happens after clicking

Thanks
GSL
 
C

Christoph Wienands

Hey Greg,

greg said:
I know this is more JS problem but this newsgroup is my home!!! :)

in my page i have something like
link.NavigateUrl="javascript:window('some url?tkt=yyy%2kjh')

now contents of tkt is encrypted (in c#) userid
after encryption of course I urlencode

now when the new browser window (after clicking that link) pops up
I see that somehow in the process of cicking off new window
Javascript urldecoded the contents of tkt parameter like instead of %20
putting some slashes etc etc
of course decryption does not work with bad url

I just had the same problem. My solution was to convert the encrypted byte
array to hex digits. In your case you'd end up with something like 'some
url?tkt=A2190D5C83'.

Christoph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top