-
-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Description
I was running some fuzzing tests in an application where i am using this library and discouvered it created invalid xml when ]]>
appeared in the xml. while i escape that to ]]>
your library then unescapes it back to ]]>
i added this test which outlines my assumption.
diff --git a/xml/xml_test.go b/xml/xml_test.go
index 03e5779..603b77e 100644
--- a/xml/xml_test.go
+++ b/xml/xml_test.go
@@ -42,6 +42,7 @@ func TestXML(t *testing.T) {
{"<x>\n<!--y-->\n</x>", `<x></x>`},
{`<style>lala{color:red}</style>`, `<style>lala{color:red}</style>`},
{`cats and dogs `, `cats and dogs`},
+ {`<x> ]]> </x>`, `<x>]]></x>`}, // #722
// go fuzz
{`</0`, `</0`},
Note i worked around this for my use case by calling
delete(xml.EntitiesMap, "gt")
that obviously removes some valid minifications though
Metadata
Metadata
Assignees
Labels
No labels