twitmoji should just be unicode

This commit is contained in:
Ted Unangst 2022-02-11 18:03:32 -05:00
parent d272b8110a
commit f8c862275e
1 changed files with 4 additions and 0 deletions

View File

@ -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(" <img src='%s'>", htfilter.GetAttr(node, "src"))
}