]> Cypherpunks.ru repositories - gostls13.git/commit
encoding/xml: error when closing tag does not match opening tag
authorConstantin Konstantinidis <constantinkonstantinidis@gmail.com>
Sun, 15 Apr 2018 09:26:32 +0000 (11:26 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 9 Nov 2022 03:01:28 +0000 (03:01 +0000)
commitf13849a7af4c058caa6af14f7d3f9aa81982c124
tree6e67cfdb501e6df5f42b38a54fce2deef2376ce6
parentb459166219b77857dc6d9366366b015d84e17bbe
encoding/xml: error when closing tag does not match opening tag

Comparing opening and closing tag is done using the prefix when available.
Documentation states that Token returns URI in the Space part of the Name.
Translation has been moved for the End tag before the namespace is removed
from the stack.

After closing a tag using a namespace, the valid namespace must be taken
from the opening tag. Tests added.

Fixes #20685

Change-Id: I4d90b19f7e21a76663f0ea1c1db6c6bf9fd2a389
Reviewed-on: https://go-review.googlesource.com/c/go/+/107255
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
src/encoding/xml/xml.go
src/encoding/xml/xml_test.go