-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone 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.
Milestone
Description
What version of Go are you using (go version
)?
play.golang.org (1.17.2)
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
N/A
What did you do?
https://play.golang.org/p/2J4gNo_saN3
What did you expect to see?
Error message about closing tag being in wrong namespace
What did you see instead?
The error message is accurate:
panic: XML syntax error on line 4: element <foo> in space http://example.comclosed by </foo> in space
However there are a couple of ways this could be improved.
- Add a whitespace separator before the words "closed by", so it doesn't crash into the namespace URI
- Put quotation marks around the namespace (or make the null namespace visible in some other way; or remove the words "in space" if the namespace is not set).
e.g. this would be better:
panic: XML syntax error on line 4: element <foo> in space "http://example.com" closed by </foo> in space ""
Reference: https://github.com/golang/go/blob/master/src/encoding/xml/xml.go#L502
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone 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.