diff options
Diffstat (limited to 'src/encoding/xml/xml.go')
| -rw-r--r-- | src/encoding/xml/xml.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoding/xml/xml.go b/src/encoding/xml/xml.go index 0fe323f7c8..951676d403 100644 --- a/src/encoding/xml/xml.go +++ b/src/encoding/xml/xml.go @@ -1004,8 +1004,9 @@ Input: } // <![CDATA[ section ends with ]]>. - // It is an error for ]]> to appear in ordinary text. - if b0 == ']' && b1 == ']' && b == '>' { + // It is an error for ]]> to appear in ordinary text, + // but it is allowed in quoted strings. + if quote < 0 && b0 == ']' && b1 == ']' && b == '>' { if cdata { trunc = 2 break Input |
