MCPcopy Index your code
hub / github.com/ZenNotes/zennotes / htmlAttrEscape

Function htmlAttrEscape

apps/server/internal/httpserver/server.go:1070–1078  ·  view source on GitHub ↗

htmlAttrEscape escapes the characters that would let a base-path value break out of a double-quoted HTML attribute.

(value string)

Source from the content-addressed store, hash-verified

1068// htmlAttrEscape escapes the characters that would let a base-path
1069// value break out of a double-quoted HTML attribute.
1070func htmlAttrEscape(value string) string {
1071 replacer := strings.NewReplacer(
1072 "&", "&",
1073 "\"", """,
1074 "<", "&lt;",
1075 ">", "&gt;",
1076 )
1077 return replacer.Replace(value)
1078}
1079
1080func indexOfFold(haystack, needle []byte) int {
1081 n := len(needle)

Callers 1

injectBasePathHintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected