]> Cypherpunks repositories - gostls13.git/commit
Revert "encoding/xml: reject XML declaration after start of document"
authorRuss Cox <rsc@golang.org>
Fri, 8 Mar 2024 18:25:14 +0000 (18:25 +0000)
committerGopher Robot <gobot@golang.org>
Fri, 8 Mar 2024 18:46:41 +0000 (18:46 +0000)
commit32014d549609422748dcb698fef1d43a5a33b0b4
tree163cd85fd56ff2d701291d314eedb4e327a0d185
parenta46285f8c2389b92952c1484daacfccf70a17047
Revert "encoding/xml: reject XML declaration after start of document"

This reverts commit 8a0fbd75a54c27ff2ae624ac2775bf752cdbceb4.

Reason for revert: Breaking real-world tests inside Google,
which means it probably breaks real-world tests outside Google.

One instance I have seen is a <!-- --> comment (often a copyright notice) before the procinst.

Another test checks that a canonicalizer can handle a test input that simply has procinsts mid-XML.

XML is full of contradictions, XML implementations more so. If we are going to start being picky, that probably needs to be controlled by a GODEBUG (and a proposal).

For #65691 (will reopen manually).

Change-Id: Ib52d0944b1478e71744a2a35b271fdf7e1c972ca
Reviewed-on: https://go-review.googlesource.com/c/go/+/570175
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Russ Cox <rsc@golang.org>
src/encoding/xml/marshal.go
src/encoding/xml/marshal_test.go
src/encoding/xml/xml.go
src/encoding/xml/xml_test.go