aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2014-06-16 13:07:05 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2014-07-03 15:03:46 +0100
commit11d322516722b3a91dc0854e332189928db7cb3d (patch)
tree419149f2d3f8134816763bc3a98dea22f4a50b9b
parent291c66c7700b8e6c90052b6d4eb436909fbe0865 (diff)
Use https for UK site where appropriate
Council redirects, BASE_URL comparisons, hard coded links, email signatures For #488
-rw-r--r--perllib/FixMyStreet/Cobrand/UKCouncils.pm9
-rw-r--r--t/app/controller/report_new.t4
-rw-r--r--templates/email/default/submit-example.txt4
-rw-r--r--templates/email/default/submit.txt2
-rw-r--r--templates/email/fixmystreet/signature.txt4
-rwxr-xr-xtemplates/web/barnet/faq/faq-en-gb.html2
-rw-r--r--templates/web/emptyhomes/faq/faq-cy.html2
-rwxr-xr-xtemplates/web/emptyhomes/faq/faq-en-gb.html2
-rw-r--r--templates/web/fixmystreet/header.html2
-rw-r--r--templates/web/fixmystreet/static/fun.html12
-rw-r--r--templates/web/fixmystreet/static/posters.html2
-rw-r--r--templates/web/fixmystreet/tracking_code.html4
-rwxr-xr-xtemplates/web/oxfordshire/faq/faq-en-gb.html2
-rw-r--r--templates/web/oxfordshire/footer.html2
-rw-r--r--templates/web/reading/reports/cobrand_stats.html2
15 files changed, 28 insertions, 27 deletions
diff --git a/perllib/FixMyStreet/Cobrand/UKCouncils.pm b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
index ec3423f35..c4e33a3c1 100644
--- a/perllib/FixMyStreet/Cobrand/UKCouncils.pm
+++ b/perllib/FixMyStreet/Cobrand/UKCouncils.pm
@@ -40,8 +40,9 @@ sub base_url {
my $base_url = mySociety::Config::get('BASE_URL');
my $u = $self->council_url;
if ( $base_url !~ /$u/ ) {
- $base_url =~ s{http://(?!www\.)}{http://$u.}g;
- $base_url =~ s{http://www\.}{http://$u.}g;
+ # council cobrands are not https so transform to http as well
+ $base_url =~ s{(https?)://(?!www\.)}{http://$u.}g;
+ $base_url =~ s{(https?)://www\.}{http://$u.}g;
}
return $base_url;
}
@@ -59,7 +60,7 @@ sub area_check {
if ($council_match) {
return 1;
}
- my $url = 'http://www.fixmystreet.com/';
+ my $url = 'https://www.fixmystreet.com/';
if ($context eq 'alert') {
$url .= 'alert';
} else {
@@ -86,7 +87,7 @@ sub reports_body_check {
# We want to make sure we're only on our page.
unless ( $self->council_name =~ /^\Q$code\E/ ) {
- $c->res->redirect( 'http://www.fixmystreet.com' . $c->req->uri->path_query, 301 );
+ $c->res->redirect( 'https://www.fixmystreet.com' . $c->req->uri->path_query, 301 );
$c->detach();
}
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 157d63d01..e3dc46c64 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -1485,7 +1485,7 @@ subtest "categories from deleted bodies shouldn't be visible for new reports" =>
subtest "extra google analytics code displayed on logged in problem creation" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { fixmystreet => '.' } ],
- BASE_URL => 'http://www.fixmystreet.com',
+ BASE_URL => 'https://www.fixmystreet.com',
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
# check that the user does not exist
@@ -1544,7 +1544,7 @@ subtest "extra google analytics code displayed on logged in problem creation" =>
subtest "extra google analytics code displayed on email confirmation problem creation" => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { fixmystreet => '.' } ],
- BASE_URL => 'http://www.fixmystreet.com',
+ BASE_URL => 'https://www.fixmystreet.com',
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
$mech->log_out_ok;
diff --git a/templates/email/default/submit-example.txt b/templates/email/default/submit-example.txt
index 117584467..3bac19e1e 100644
--- a/templates/email/default/submit-example.txt
+++ b/templates/email/default/submit-example.txt
@@ -8,7 +8,7 @@ local problem that they believe might require your attention.
To view a map of the precise location of this issue, or to provide
an update on the problem, please visit the following link:
- http://www.fixmystreet.com/report/39092
+ https://www.fixmystreet.com/report/39092
----------
@@ -51,7 +51,7 @@ The FixMyStreet team
This message was sent via FixMyStreet, a project of UKCOD,
registered charity number 1076346. If there is a more appropriate
email address for messages about 'Potholes', please let us know by
-visiting <http://www.fixmystreet.com/contact>. This will help
+visiting <https://www.fixmystreet.com/contact>. This will help
improve the service for local people. We also welcome any other
feedback you may have.
diff --git a/templates/email/default/submit.txt b/templates/email/default/submit.txt
index 2a2eae3e6..8f4ef468c 100644
--- a/templates/email/default/submit.txt
+++ b/templates/email/default/submit.txt
@@ -33,7 +33,7 @@ Replies to this email will go to the user who submitted the problem.
This message was sent via FixMyStreet, a project of UKCOD, registered charity
number 1076346. If there is a more appropriate email address for messages about
-<?=$values['category_footer']?>, please let us know by visiting <http://www.fixmystreet.com/contact>.
+<?=$values['category_footer']?>, please let us know by visiting <https://www.fixmystreet.com/contact>.
This will help improve the service for local people. We
also welcome any other feedback you may have.
diff --git a/templates/email/fixmystreet/signature.txt b/templates/email/fixmystreet/signature.txt
index 67906ac2f..14b7d83e7 100644
--- a/templates/email/fixmystreet/signature.txt
+++ b/templates/email/fixmystreet/signature.txt
@@ -2,10 +2,10 @@ All the best,
The FixMyStreet team
-http://www.FixMyStreet.com
+https://www.FixMyStreet.com
Twitter: https://twitter.com/FixMyStreet
Facebook: http://www.facebook.com/fixmystreet
Problems? questions?
-Visit http://www.fixmystreet.com/faq
+Visit https://www.fixmystreet.com/faq
diff --git a/templates/web/barnet/faq/faq-en-gb.html b/templates/web/barnet/faq/faq-en-gb.html
index 08bb744a6..bc381a509 100755
--- a/templates/web/barnet/faq/faq-en-gb.html
+++ b/templates/web/barnet/faq/faq-en-gb.html
@@ -46,7 +46,7 @@ by a user of the site.</dd>
</dd>
<dt>Can I use these pages to report problems outside of the London Borough of Barnet?</dd>
- <dd>No, please visit the main FixMyStreet site at <a href="http://www.fixmystreet.com/">http://www.fixmystreet.com/</a> to report problem outside the borough.</dd>
+ <dd>No, please visit the main FixMyStreet site at <a href="https://www.fixmystreet.com/">https://www.fixmystreet.com/</a> to report problem outside the borough.</dd>
<dt>Who built FixMyStreet?</dt>
<dd>FixMyStreet was built by <a href="http://www.mysociety.org/">mySociety</a>, in conjunction with the <a href="http://www.youngfoundation.org.uk/">Young Foundation</a>.
diff --git a/templates/web/emptyhomes/faq/faq-cy.html b/templates/web/emptyhomes/faq/faq-cy.html
index 2945d24a9..842f0c028 100644
--- a/templates/web/emptyhomes/faq/faq-cy.html
+++ b/templates/web/emptyhomes/faq/faq-cy.html
@@ -48,7 +48,7 @@ Os taw’r llywodraeth neu un o’i hasiantaethau sy’n berchen ar yr eiddo gwa
href="http://github.com/mysociety/fixmystreet"> lawrlwytho’r cod gwreiddiol</a> a’n helpu ni i’w ddatblygu.
Mae croeso i chi hefyd ei ddefnyddio yn eich prosiectau eich hunan, er bod rhaid i chi ryddhau’r cod gwreiddiol i unrhyw brosiectau o’r fath.</dd>
<dt>Pobl sy’n adeiladu pethau, nid sefydliadau. Pwy wnaeth ei adeiladu <em>go iawn</em>?</dt>
- <dd>Ysgrifennwyd yr addasiad hwn o <a href="http://www.fixmystreet.com/">Fix&shy;MyStreet</a>
+ <dd>Ysgrifennwyd yr addasiad hwn o <a href="https://www.fixmystreet.com/">Fix&shy;MyStreet</a>
gan Matthew Somerville. Diolch i’r
<a href="http://www.ordnancesurvey.co.uk">Arolwg Ordnans</a> (am y mapiau,
codau post y DU a chyfeiriadau’r DU &ndash; data &copy; Hawlfraint y Goron, cedwir pob hawl
diff --git a/templates/web/emptyhomes/faq/faq-en-gb.html b/templates/web/emptyhomes/faq/faq-en-gb.html
index e6fbc25ea..6bf3b7370 100755
--- a/templates/web/emptyhomes/faq/faq-en-gb.html
+++ b/templates/web/emptyhomes/faq/faq-en-gb.html
@@ -91,7 +91,7 @@ source code</a> and help us develop it.
You&rsquo;re welcome to use it in your own projects, although you must also
make available the source code to any such projects.</dd>
<dt>People build things, not organisations. Who <em>actually</em> built it?</dt>
- <dd>This adaptation of <a href="http://www.fixmystreet.com/">Fix&shy;MyStreet</a>
+ <dd>This adaptation of <a href="https://www.fixmystreet.com/">Fix&shy;MyStreet</a>
was written by Matthew Somerville. Thanks go to
<a href="http://www.ordnancesurvey.co.uk">Ordnance Survey</a> (for the maps,
UK postcodes, and UK addresses &ndash; data &copy; Crown copyright, all
diff --git a/templates/web/fixmystreet/header.html b/templates/web/fixmystreet/header.html
index 6ed84a85d..7ddb09e26 100644
--- a/templates/web/fixmystreet/header.html
+++ b/templates/web/fixmystreet/header.html
@@ -28,7 +28,7 @@
[% extra_js %]
[% IF c.req.uri.host == 'osm.fixmystreet.com' %]
- <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
+ <link rel="canonical" href="https://www.fixmystreet.com[% c.req.uri.path_query %]">
[% END %]
[% TRY %][% PROCESS 'header_extra.html' %][% CATCH file %][% END %]
diff --git a/templates/web/fixmystreet/static/fun.html b/templates/web/fixmystreet/static/fun.html
index 57a74a0d7..03d977d44 100644
--- a/templates/web/fixmystreet/static/fun.html
+++ b/templates/web/fixmystreet/static/fun.html
@@ -10,24 +10,24 @@ Do let us know if you find any more.</p>
<ul class="plain-list">
- <li><img src='http://www.fixmystreet.com/photo/9468.jpeg' align='right' hspace=8>
+ <li><img src='https://www.fixmystreet.com/photo/9468.jpeg' align='right' hspace=8>
<h2>Dumped Piano (right)</h2>
<p>The reporter of this problem summed it up with their report,
which consisted solely of the one character &ldquo;!&rdquo;. &mdash;
- <a href='http://www.fixmystreet.com/report/9468'>Problem report</a>
+ <a href='https://www.fixmystreet.com/report/9468'>Problem report</a>
<li><h2>Mad Seagull</h2>
<p>&ldquo;A seagull is attacking various cars within this road. He starts at around 05:45 every morning and continues until around 19:30. This causes a lot of noisy banging and wakes up children.&rdquo; &mdash;
- <a href='http://www.fixmystreet.com/report/2722'>Problem report</a>
+ <a href='https://www.fixmystreet.com/report/2722'>Problem report</a>
- <li><img src='http://www.fixmystreet.com/photo/6553.jpeg' align='right' hspace=8>
+ <li><img src='https://www.fixmystreet.com/photo/6553.jpeg' align='right' hspace=8>
<h2>Boxes full of cheese dumped (right)</h2>
<p>&ldquo;About a dozen boxes full of mozzarella cheese have been dumped opposite 3 rufford street. if it warms up we could have nasty road topping problem (seriously there is a lot of cheese)&rdquo; &mdash;
- <a href='http://www.fixmystreet.com/report/6553'>Problem report</a>
+ <a href='https://www.fixmystreet.com/report/6553'>Problem report</a>
<li><h2>Dangerous Nivea Billboard</h2>
<p>&ldquo;The Nivea 'Oxygen is a wonderful thing' billboard here has a device on it releasing bubbles and foam. This is blowing into the road which is both distracting and dangerous to drivers. A large ball of foam hit my windscreen unexpectedly and nearly caused me to have an accident&rdquo; &mdash;
- <a href='http://www.fixmystreet.com/report/7552'>Problem report</a>
+ <a href='https://www.fixmystreet.com/report/7552'>Problem report</a>
</ul>
diff --git a/templates/web/fixmystreet/static/posters.html b/templates/web/fixmystreet/static/posters.html
index 760397b02..b56a6f847 100644
--- a/templates/web/fixmystreet/static/posters.html
+++ b/templates/web/fixmystreet/static/posters.html
@@ -3,7 +3,7 @@
%]
[%
- badge = '<a href="http://www.fixmystreet.com/"> <img src="http://www.fixmystreet.com/i/fms-badge.jpeg" alt="FixMyStreet - report, view or discuss local problems" border="0"></a>'
+ badge = '<a href="https://www.fixmystreet.com/"> <img src="https://www.fixmystreet.com/i/fms-badge.jpeg" alt="FixMyStreet - report, view or discuss local problems" border="0"></a>'
%]
<h1>Publicity Material</h1>
diff --git a/templates/web/fixmystreet/tracking_code.html b/templates/web/fixmystreet/tracking_code.html
index 9d8c00d3c..0453e1a22 100644
--- a/templates/web/fixmystreet/tracking_code.html
+++ b/templates/web/fixmystreet/tracking_code.html
@@ -1,4 +1,4 @@
-[% IF c.config.BASE_URL == "http://www.fixmystreet.com" %]
+[% IF c.config.BASE_URL == "https://www.fixmystreet.com" %]
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -23,5 +23,5 @@ ga('send', 'pageview');
</script>
[% ELSE %]
-<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "http://www.fixmystreet.com" -->
+<!-- Tracking code not inserted as "[% c.config.BASE_URL %]" not "https://www.fixmystreet.com" -->
[% END %]
diff --git a/templates/web/oxfordshire/faq/faq-en-gb.html b/templates/web/oxfordshire/faq/faq-en-gb.html
index 3aa87e229..ddf3fc44d 100755
--- a/templates/web/oxfordshire/faq/faq-en-gb.html
+++ b/templates/web/oxfordshire/faq/faq-en-gb.html
@@ -227,7 +227,7 @@
</dd>
</dl>
<p>
- You can find out more about FixMyStreet at <a href="http://www.fixmystreet.com">www.fixmystreet.com</a>.
+ You can find out more about FixMyStreet at <a href="https://www.fixmystreet.com">www.fixmystreet.com</a>.
</p>
<p>&nbsp;<p>
diff --git a/templates/web/oxfordshire/footer.html b/templates/web/oxfordshire/footer.html
index 29146d935..6ab9733d2 100644
--- a/templates/web/oxfordshire/footer.html
+++ b/templates/web/oxfordshire/footer.html
@@ -40,7 +40,7 @@
</address>
<ul><!-- use | between items -->
<li class="powered-by-fms">
- <a href="http://www.fixmystreet.com/">Powered&nbsp;by&nbsp;<img src="/cobrands/oxfordshire/images/fms-logo-inverse.png" alt="FixMyStreet"></a>
+ <a href="https://www.fixmystreet.com/">Powered&nbsp;by&nbsp;<img src="/cobrands/oxfordshire/images/fms-logo-inverse.png" alt="FixMyStreet"></a>
</li>
</ul>
</div>
diff --git a/templates/web/reading/reports/cobrand_stats.html b/templates/web/reading/reports/cobrand_stats.html
index 80976c3a6..381e4f5af 100644
--- a/templates/web/reading/reports/cobrand_stats.html
+++ b/templates/web/reading/reports/cobrand_stats.html
@@ -1,5 +1,5 @@
<ul>
<li>Reports submitted via <a href="[% uri_for('/') %]">reading.fixmystreet.com</a>: [% stats.cobrand %]</li>
- <li>Reports submitted via <a href="http://www.fixmystreet.com/">www.fixmystreet.com</a>: [% stats.main_site %]<br /><br />
+ <li>Reports submitted via <a href="https://www.fixmystreet.com/">www.fixmystreet.com</a>: [% stats.main_site %]<br /><br />
Statistics date from launch of Reading FixMyStreet.</li>
</ul>