Anchors in event redirects, how to remove

I have stumbled across something that has baffled me.

I am doing some research into oAuth authentication, and what better to start with than FB’s. The code is all working fine, except when the user has to accept the request and authorise the application. Facebook will return something like this