]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: fix reserved namespace check to be case-insensitive
authorIan Lance Taylor <iant@golang.org>
Tue, 20 Oct 2020 22:19:36 +0000 (15:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 21 Oct 2020 23:51:30 +0000 (23:51 +0000)
commitcb768c801a9cafa18fe7805ac70bd947930fcdc7
tree0ab06878d3c7b0b8ab9050b10af4294c4faa1840
parent9a49f772575f8009355ac7d64d51ef41bc960c3d
encoding/xml: fix reserved namespace check to be case-insensitive

Fixes the check for the reserved namespace prefix
"xml" to be case insensitive, so as to match all variants of:

    (('X'|'x')('M'|'m')('L'|'l'))

as mandated by Section 2.3 of https://www.w3.org/TR/REC-xml/

This is a roll forward of CL 203417, which was rolled back by CL 240179.
We've decided that the roll back was incorrect, and any broken tests
should be fixed.

The original CL 203417 was by Tamás Gulácsi.

Fixes #35151
For #39876

Change-Id: I2e6daa7aeb252531fba0b8a56086613e13059528
Reviewed-on: https://go-review.googlesource.com/c/go/+/264024
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
doc/go1.16.html
src/encoding/xml/marshal.go
src/encoding/xml/marshal_test.go