From f8c862275ec3f87f1c8046fa856a1b7da56352df Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 11 Feb 2022 18:03:32 -0500 Subject: [PATCH] twitmoji should just be unicode --- hoot.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hoot.go b/hoot.go index 03029e1..14d3005 100644 --- a/hoot.go +++ b/hoot.go @@ -53,6 +53,10 @@ func hootextractor(r io.Reader, url string, seen map[string]bool) string { var htf htfilter.Filter htf.Imager = func(node *html.Node) string { + alt := htfilter.GetAttr(node, "alt") + if htfilter.HasClass(node, "Emoji") && alt != "" { + return alt + } return fmt.Sprintf(" ", htfilter.GetAttr(node, "src")) }