diff options
author | Dave Whiteland <dave@mysociety.org> | 2013-01-27 02:57:26 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2013-01-27 02:57:26 +0000 |
commit | 59a948d95d91154f62ea11bb8d47c0c3181e46e6 (patch) | |
tree | e5e724da2cf90cd54189a298654159e27463faf4 | |
parent | 066499bf6cbf4afc208f4707c355d4d202607444 (diff) |
MM https URL should really just change the protocol
-rw-r--r-- | web/cobrands/fixmybarangay/message_manager_client.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/cobrands/fixmybarangay/message_manager_client.js b/web/cobrands/fixmybarangay/message_manager_client.js index c95772cbc..a73fe5c14 100644 --- a/web/cobrands/fixmybarangay/message_manager_client.js +++ b/web/cobrands/fixmybarangay/message_manager_client.js @@ -455,7 +455,7 @@ var message_manager = (function() { var err_msg = "Unable to load messages: "; if (st === 0 && textStatus === 'error') { // x-domain hard to detect, sometimes intermittent? if (_url_root.indexOf('https')===0 && ! location.protocol != 'https:') { - var surl = _url_root.replace(/\/$/, '') + location.pathname + location.search; + var surl = location.href.replace(/^http:/, 'https:'); err_msg += 'this is an insecure URL.<br/><a href="' + surl + '">Try from HTTPS instead?</a>'; msg_is_html = true; } else { |