diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-07-22 17:21:40 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-07-22 17:21:40 +0200 |
| commit | d13ad40a538709ae93dd4ca38da8f41b6be51775 (patch) | |
| tree | 52729351792e9b937ca03f24a5e2134671e349cb | |
| parent | 824528974c054ed13d4fccd15146f5221eab3459 (diff) | |
profile link
| -rw-r--r-- | public/assets/js/lib/views/profile/profile.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/public/assets/js/lib/views/profile/profile.js b/public/assets/js/lib/views/profile/profile.js index 46ade8e..77ec121 100644 --- a/public/assets/js/lib/views/profile/profile.js +++ b/public/assets/js/lib/views/profile/profile.js @@ -77,10 +77,14 @@ var ProfileView = View.extend({ } } if (user.website) { - var website = sanitizeHTML(user.website) + var website = user.website + var website_url = user.website + if (website_url.indexOf('http') !== 0) { + website_url = 'https://' + website_url + } fields.push([ 'Website', - '<a href="' + sanitizeHTML(website) + '">' + sanitizeHTML(website) + '</a>' + '<a href="' + sanitizeHTML(website_url) + '">' + sanitizeHTML(website) + '</a>' ]) } |
