Merge pull request #81 from liggitt/ascii
Always encode binary data to ascii-escaped strings
This commit is contained in:
commit
f449dcd26c
|
@ -346,7 +346,7 @@ func uncompressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
||||||
if utf8.Valid(b) {
|
if utf8.Valid(b) {
|
||||||
fmt.Fprintf(w, "`%s`", sanitize(b))
|
fmt.Fprintf(w, "`%s`", sanitize(b))
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(w, "%q", b)
|
fmt.Fprintf(w, "%+q", b)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = fmt.Fprintf(w, `)
|
_, err = fmt.Fprintf(w, `)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user