utils_html.go: return empty string if title is empty
This commit is contained in:
parent
4945e53553
commit
a2c8a73d3e
@ -6,6 +6,10 @@ import (
|
||||
)
|
||||
|
||||
func htmlTitleRecurse(h *html.Node) string {
|
||||
if h == nil || h.FirstChild == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if h.Type == html.ElementNode && h.Data == "title" {
|
||||
return h.FirstChild.Data
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user