- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for htmlSafeSet (0.18 sec)
-
src/encoding/json/tables.go
'v': true, 'w': true, 'x': true, 'y': true, 'z': true, '{': true, '|': true, '}': true, '~': true, '\u007f': true, } // htmlSafeSet holds the value true if the ASCII character with the given // array position can be safely represented inside a JSON string, embedded // inside of HTML <script> tags, without any additional escaping. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 08 18:02:34 UTC 2016 - 4.2K bytes - Viewed (0) -
internal/kms/context.go
// escapeStringJSON will escape a string for JSON and write it to dst. func escapeStringJSON(dst *bytes.Buffer, s string) { start := 0 for i := 0; i < len(s); { if b := s[i]; b < utf8.RuneSelf { if htmlSafeSet[b] { i++ continue } if start < i { dst.WriteString(s[start:i]) } dst.WriteByte('\\') switch b { case '\\', '"': dst.WriteByte(b) case '\n':
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 6K bytes - Viewed (0) -
src/encoding/json/encode.go
} func appendString[Bytes []byte | string](dst []byte, src Bytes, escapeHTML bool) []byte { dst = append(dst, '"') start := 0 for i := 0; i < len(src); { if b := src[i]; b < utf8.RuneSelf { if htmlSafeSet[b] || (!escapeHTML && safeSet[b]) { i++ continue } dst = append(dst, src[start:i]...) switch b { case '\\', '"': dst = append(dst, '\\', b) case '\b':
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 36.2K bytes - Viewed (0)