MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / ReplaceEntitiesString

Function ReplaceEntitiesString

xmlparser/entities.go:63–65  ·  view source on GitHub ↗

ReplaceEntitiesString replaces XML entities in the given string according to the provided entity map.

(data string, em map[string][]byte)

Source from the content-addressed store, hash-verified

61// ReplaceEntitiesString replaces XML entities in the given string
62// according to the provided entity map.
63func ReplaceEntitiesString(data string, em map[string][]byte) string {
64 return replaceEntities(data, em, strings.IndexByte)
65}
66
67func replaceEntities[T string | []byte](
68 data T,

Callers 3

TestReplaceEntitiesFunction · 0.92
replaceEntitiesMethod · 0.85

Calls 1

replaceEntitiesFunction · 0.85

Tested by 2

TestReplaceEntitiesFunction · 0.74