Skip to content

Commit

Permalink
Explicit protocol in gravatar links
Browse files Browse the repository at this point in the history
Although // links are better normally, it appears that within email bodies, they
are not processed like they would be in a web browser context. As a result, any
user with a Gravatar will not have their picture show up in emails. This commit
explicitly uses HTTPS so that Gravatars show up in emails.
  • Loading branch information
Stephen Brennan committed Feb 16, 2017
1 parent d375ace commit 2b495d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_gravatar(self):
m = hashlib.md5()
m.update(self.user.email())
encoded_hash = base64.b16encode(m.digest()).lower()
return '//gravatar.com/avatar/{}?s=200'.format(encoded_hash)
return 'https://gravatar.com/avatar/{}?s=200'.format(encoded_hash)

def get_photo_url(self):
"""Return an avatar photo URL (depending on Gravatar config). This still could
Expand Down

0 comments on commit 2b495d7

Please sign in to comment.