MCPcopy Create free account
hub / github.com/antchfx/xmlquery / TestEscapeOutputValue

Function TestEscapeOutputValue

node_test.go:415–428  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

413}
414
415func TestEscapeOutputValue(t *testing.T) {
416 data := `<AAA>&lt;*&gt;</AAA>`
417
418 root, err := Parse(strings.NewReader(data))
419 if err != nil {
420 t.Error(err)
421 }
422
423 escapedInnerText := root.OutputXML(true)
424 if !strings.Contains(escapedInnerText, "&lt;*&gt;") {
425 t.Fatal("Inner Text has not been escaped")
426 }
427
428}
429
430func TestEscapeValueWrite(t *testing.T) {
431 data := `<AAA>&lt;*&gt;</AAA>`

Callers

nothing calls this directly

Calls 2

ParseFunction · 0.85
OutputXMLMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…