Fixed an issue with JApplication redirecting to invalid URLs 

When HTTP headers have already been sent, JApplication::redirect() falls back on a javascript redirect. However it's passing the URL through htmlspecialchars so any URL with and ampersand in the URI will be invalid.