summaryrefslogtreecommitdiff
path: root/href.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-07-18 17:18:21 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-07-18 17:18:21 +0200
commitcc7394cd10f7b8ca16676d5e1b042908a4862d86 (patch)
tree3589a0238d6bc8596443de14b23d71d686a744d0 /href.go
parentbcd472b309ac932031932da0fa7637e2f858dd1e (diff)
Limit title length
Diffstat (limited to 'href.go')
-rw-r--r--href.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/href.go b/href.go
index 811a963..f661e50 100644
--- a/href.go
+++ b/href.go
@@ -43,5 +43,9 @@ func FetchTitle(url string) (string, error) {
title := findTitle(doc)
cache[url] = title
+ if len(title) > 80 {
+ title = title[:80] + " ..."
+ }
+
return title, nil
}