Commit a2c8a73d authored by Adhityaa Chandrasekar's avatar Adhityaa Chandrasekar

utils_html.go: return empty string if title is empty

parent 4945e535
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment