Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/xml: wrongly rejects ]]> in attribute value #68387

Open
DemiMarie opened this issue Jul 11, 2024 · 1 comment
Open

encoding/xml: wrongly rejects ]]> in attribute value #68387

DemiMarie opened this issue Jul 11, 2024 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@DemiMarie
Copy link

DemiMarie commented Jul 11, 2024

Go version

Whatever https://go.dev/play uses

Output of go env in your module/workspace:

Whatever https://go.dev/play uses

What did you do?

https://go.dev/play/p/cxvESJwGocp

package main

import "encoding/xml"

func main() {
	err := xml.Unmarshal([]byte(`<a b="]]>"/>`), new(interface{}))
	if err != nil {
		panic("well-formed XML rejected")
	}
}

What did you see happen?

encoding/xml rejects an attribute containing ]]>.

What did you expect to see?

encoding/xml should accept attributes containing ]]>, as libxml2 does.

@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants