xml: Allow entities inside CDATA tags

Fixes #1112.

R=rsc
CC=golang-dev
https://golang.org/cl/2255042
This commit is contained in:
Dan Sinclair 2010-09-24 12:23:01 -04:00 committed by Russ Cox
parent 2ee420fa5e
commit 8d87ccad0b
2 changed files with 12 additions and 1 deletions

View file

@ -790,7 +790,7 @@ Input:
if quote >= 0 && b == byte(quote) {
break Input
}
if b == '&' {
if b == '&' && !cdata {
// Read escaped character expression up to semicolon.
// XML in all its glory allows a document to define and use
// its own character names with <!ENTITY ...> directives.