fix($location) solve when url is "javascript:" or "mailto:"

When url is started with "javascript:" or "mailto:"
It still do the redirect.