MCPcopy Create free account
hub / github.com/egonelbre/exp / EscapeAttribute

Function EscapeAttribute

htmlrender/dom/util.go:18–24  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

16}
17
18func EscapeAttribute(s string) string {
19 s = html.EscapeString(s)
20 s = strings.Replace(s, "'", "'", -1)
21 // s = strings.Replace(s, """, "\"", -1)
22 s = strings.Replace(s, " ", " ", -1)
23 return s
24}
25
26func EscapeString(s string) string {
27 s = html.EscapeString(s)

Callers 1

AttrMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected