Pulling location.href or window.location from fox without encoding it

I pass the url via google translate and in my location bar on Fire fox, url looks like it should:

http://72.14.235.104/translate_c?hl=ru&langpair=en|ru&sl=ru&tl=ru&u=http://something.something/something/.....orig_term%3D malaria

I want to grab orig_term and apply its value to other places on my page on load. The problem is that even though you have specified the location exactly, window.location, window.location.href, location.href all display values ​​with orig_term encoded. I tried to decode the encoded value, but its representation is:

мР° Ð "ÐÐи

Does anyone know why this works fine in IE but not Fire Fox?

+1


source to share


1 answer


I just put this url in the Firefox 3 address bar: http://www.google.com/search?q=malaria

I can get the correct data if I decodeURI href. I replaced the above url in my address bar to test it.



javascript:alert(decodeURI(window.location.href))

      

+1


source







All Articles