From d8c8b6696a03dbbb8fe11ab68723fdaf03b3e62e Mon Sep 17 00:00:00 2001 From: Zed Date: Tue, 8 Oct 2019 23:12:08 +0200 Subject: [PATCH] Linkify profile card website properly --- src/parser.nim | 2 +- src/views/profile.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.nim b/src/parser.nim index 7263452..70344e6 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -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), diff --git a/src/views/profile.nim b/src/views/profile.nim index 6a6b619..1f0468a 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -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)):