Linkify profile card website properly

This commit is contained in:
Zed 2019-10-08 23:12:08 +02:00
parent 9e890df482
commit d8c8b6696a
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ proc parseTimelineProfile*(node: XmlNode): Profile =
username: profile.getUsername(pre & "screenname"),
joinDate: profile.getDate(pre & "joinDateText"),
location: profile.selectText(pre & "locationText").stripText(),
website: profile.selectText(pre & "url").stripText(),
website: profile.selectAttr(pre & "urlText a", "title"),
bio: profile.getBio(pre & "bio"),
userpic: node.getAvatar(".profile-picture img"),
verified: isVerified(profile),

View File

@ -35,7 +35,7 @@ proc renderProfileCard*(profile: Profile; prefs: Prefs): VNode =
tdiv(class="profile-website"):
span:
icon "link"
linkText(profile.website)
verbatim linkifyText(profile.website, prefs)
tdiv(class="profile-joindate"):
span(title=getJoinDateFull(profile)):