-
-
Notifications
You must be signed in to change notification settings - Fork 926
Open
Description
Consider the following program:
package main
import (
"fmt"
"strings"
"github.com/PuerkitoBio/goquery"
)
const data = `<noscript><a href="http://example.org">click this link</a></noscript>`
func main() {
d, err := goquery.NewDocumentFromReader(strings.NewReader(data))
if err != nil {
fmt.Println(err)
return
}
a, ok := d.Find("noscript a").Attr("href")
fmt.Printf("URL: '%s', %t\n", a, ok)
}
The expected output is:
URL: 'http://example.org', true
But instead the output is:
URL: '', false
Changing noscript
to div
in both the document and selector causes the expected output, so the problem seems to affect only <noscript>
elements.
dakr0013
Metadata
Metadata
Assignees
Labels
No labels