Skip to content

Commit

Permalink
fix: parsing metadata due to regex edgecase
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijit-hota committed May 21, 2022
1 parent d438bf3 commit 60b0535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/common/get_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func searchAttributes(attributes []html.Attribute, lookingFor string) string {
return ""
}

var headRegex = regexp.MustCompile("<head>((.|\n|\r\n)+)</head>")
var headRegex = regexp.MustCompile("<head.*>((.|\n|\r\n)+)</head>")

func crawl(node *html.Node, hm *DB.Meta) {
if node.Type == html.TextNode && node.Parent.Data == "title" {
Expand Down

0 comments on commit 60b0535

Please sign in to comment.