+ Start a Discussion
Scott.MScott.M 

Strange Characters being appended to a url

Does anyone know why a returned page reference on an action would append these character %23_=_ to the end of the URL? 

 

Here's the redirect script that salesforce is running. What is the escapedHash it's screwing up the redirect and causing an exception. I can fix it by setting a bogus parameter in the page reference but that little gem still get's appended... why? 

 

<script>
var escapedHash = '';
var url = '/mypage';
if (window.location.hash) {
escapedHash = '%23' + window.location.hash.slice(1);
}
if (window.location.replace){
window.location.replace(url + escapedHash);
} else {;
window.location.href = url + escapedHash;
}
</script>

 

I get this if I don't pass a bogus parameter:

/mypage%23_=_

 

This fails hard, page doesn't exist

 

If I set a parameter I get this

/mypage?init=1%23_=_

 

The page loads fine but the last parameter would get messed up if it wasn't bogus.

 

RupaliJRupaliJ

Hi Scott,

 

I am facing the same problem. Have you got any reason of this?

 

Thanks.

craigmhcraigmh

%23 is the pound sign, so is there some sort of anchor tag at play here?

NiranjaNiranja

Hi Scott,

 

Did you find any solution for this issue, since even I am facing the same problem and not able to solve it yet ?