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