From 1fae51a9259a0f820cd7d26a98fb045bd5d7c92b Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Fri, 17 Feb 2017 11:47:31 +0100 Subject: [PATCH] Ensure to use https for feature matrix desc links Features which have a link as their description should support both http and https URLs, and for internal links make sure to replace http with https links to skip redirects. The longterm solution is to rewrite the feature description links in the database, but until then we can at least save the users a redirect step. --- pgweb/featurematrix/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgweb/featurematrix/models.py b/pgweb/featurematrix/models.py index 59aa4f3..897774c 100644 --- a/pgweb/featurematrix/models.py +++ b/pgweb/featurematrix/models.py @@ -55,8 +55,8 @@ class Feature(models.Model): @property def featurelink(self): - if self.featuredescription.startswith('http://'): - return self.featuredescription + if (self.featuredescription.startswith('http'): + return self.featuredescription.replace('http://www.postgresql.org', 'https://www.postgresql.org') else: return 'detail/%s/' % self.id -- 2.6.4 (Apple Git-63)