There was an error while loading. Please reload this page.
1 parent fb9d8da commit 5bc1abaCopy full SHA for 5bc1aba
xml/table.go
@@ -3,12 +3,12 @@ package xml
3
// EntitiesMap are all named character entities.
4
var EntitiesMap = map[string][]byte{
5
"apos": []byte("'"),
6
- "gt": []byte(">"),
7
"quot": []byte("\""),
8
}
9
10
// TextRevEntitiesMap is a map of escapes.
11
var TextRevEntitiesMap = map[byte][]byte{
12
'<': []byte("<"),
+ '>': []byte(">"),
13
'&': []byte("&"),
14
xml/xml_test.go
@@ -32,8 +32,8 @@ func TestXML(t *testing.T) {
32
{"<x a=\" a \n\r\t b \"/>", `<x a=" a b "/>`},
33
{`<x a="'b""></x>`, `<x a="'b""/>`},
34
{`<x a="""'"></x>`, `<x a='""''/>`},
35
- {`<x a="&<>"></x>`, `<x a="&<>"/>`},
36
- {`<x>&<></x>`, `<x>&<></x>`},
+ {`<x a="&<>"></x>`, `<x a="&<>"/>`},
+ {`<x>&<></x>`, `<x>&<></x>`},
37
{`<x>&&<</x>`, `<x>&&<</x>`},
38
{`<!DOCTYPE foo SYSTEM "Foo.dtd">`, `<!DOCTYPE foo SYSTEM "Foo.dtd">`},
39
{`text <!--comment--> text`, `text text`},
@@ -42,6 +42,7 @@ func TestXML(t *testing.T) {
42
{"<x>\n<!--y-->\n</x>", `<x></x>`},
43
{`<style>lala{color:red}</style>`, `<style>lala{color:red}</style>`},
44
{`cats and dogs `, `cats and dogs`},
45
+ {`<x> ]]> </x>`, `<x>]]></x>`}, // #825
46
47
// go fuzz
48
{`</0`, `</0`},
0 commit comments