Encode unicode in JSON responses
To guard against package definitions and other things including unicode or other characters.
This commit is contained in:
parent
d00b539483
commit
36d34e03fc
1 changed files with 2 additions and 2 deletions
|
|
@ -169,11 +169,11 @@
|
|||
(if stream?
|
||||
(lambda (port)
|
||||
(setvbuf port 'block (expt 2 16))
|
||||
(scm->json json port))
|
||||
(scm->json json port #:unicode #t))
|
||||
(call-with-encoded-output-string
|
||||
"utf-8"
|
||||
(lambda (port)
|
||||
(scm->json json port))))))
|
||||
(scm->json json port #:unicode #t))))))
|
||||
|
||||
(define* (render-text text #:key (extra-headers '())
|
||||
(code 200))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue