Permalink
Browse files

Fixed the linkedin getter

  • Loading branch information...
blackrobot committed Mar 22, 2012
1 parent 0f223de commit bd5e3b0d29db5db8dcb36e1084e3940e1e1602c7
@@ -118,7 +118,7 @@ def twitter_url(self):
@property
def linked_in_url(self):
if self.linked_in:
- return "http://www.linkedin.com/in/%s" % self.linked_in.strip()
+ return "http://www.linkedin.com/%s" % self.linked_in.strip()
else:
return ""
@@ -1,4 +1,3 @@
-
<div class="col-3 grid rankings players">
<h3>Players</h3>
<ul>
@@ -20,15 +20,16 @@ def external_link(url, text=""):
if url is None:
return ""
- text = url.replace('http://', '').replace('https://', '')\
- .replace('www.', '') if text == "" else text
+ if text == "":
+ for t in ['http://', 'https://', 'www.']:
+ text = url.replace(t, '')
if url[0:4] != "http":
- url = 'http://' + url
+ url = 'http://%s' % url
# remove a trailing slash if it exists
if text[-1:] == "/":
- text = text[0:-1]
+ text = text[0:-1]
return "<a href=\"%s\" title=\"%s\">%s</a>" % (url, text, text)

0 comments on commit bd5e3b0

Please sign in to comment.