Skip to content

Commit

Permalink
Parse the content attribute in other tags besides the meta tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Wiegman committed May 6, 2015
1 parent 99736a7 commit 310b1f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions microdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ func (p *parser) getValue(node *html.Node) string {
propValue = value
}
default:
// The "content" attribute can be found on other tags besides the meta tag.
if value, ok := getAttr("content", node); ok {
propValue = value
break
}

var buf bytes.Buffer
walkNodes(node, func(n *html.Node) {
if n.Type == html.TextNode {
Expand Down

0 comments on commit 310b1f6

Please sign in to comment.