MCPcopy
hub / github.com/minio/minio-go / validXMLChar

Function validXMLChar

api-remove.go:402–409  ·  view source on GitHub ↗

Return true if the character is within the allowed characters in an XML 1.0 document The list of allowed characters can be found here: https://www.w3.org/TR/xml/#charsets

(r rune)

Source from the content-addressed store, hash-verified

400// Return true if the character is within the allowed characters in an XML 1.0 document
401// The list of allowed characters can be found here: https://www.w3.org/TR/xml/#charsets
402func validXMLChar(r rune) (ok bool) {
403 return r == 0x09 ||
404 r == 0x0A ||
405 r == 0x0D ||
406 r >= 0x20 && r <= 0xD7FF ||
407 r >= 0xE000 && r <= 0xFFFD ||
408 r >= 0x10000 && r <= 0x10FFFF
409}
410
411func hasInvalidXMLChar(str string) bool {
412 for _, s := range str {

Callers 1

hasInvalidXMLCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected