- Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Description
Go version
1.22.5 (this is from pkg.go.dev)
Output of go env in your module/workspace:
Whatever is on `pkg.go.dev` as of the filing of this issueWhat did you do?
https://go.dev/play/p/_xXpPKU-YWQ
package main import "encoding/xml" func main() { err := xml.Unmarshal([]byte(`<a b="c" c="d"/>`), new(interface{})) if err != nil { panic("well-formed XML rejected") } err = xml.Unmarshal([]byte(`<a b="c"c="d"/>`), new(interface{})) if err == nil { panic("missing space before attribute name accepted") } }What did you see happen?
Unmarshaling the XML succeeds, even though there is a missing space between b="c" and c="d".
What did you expect to see?
Unmarshaling <a b="c"c="d"/> fails. libxml2 correctly rejects this.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.