1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/httputils
Yong Tang 0fa20ad13b Disable HTML escaping for JSON strings in docker inspect
This fix tries to address the issue raised in 27021 where
HTML strings like (`&, >, <, etc`) in environmental variables
are escaped for JSON output for `docker inspect`. For example,
`TEST_ENV="soanni&rtr"` has been escaped to `TEST_ENV="soanni\u0026rtr"`

This fix disabled HTML escaping with `SetEscapeHTML`, which is available
since golang 1.7.0. This changes will be applied to all JSON output
that utilize `httputils.WriteJSON`.

An integration test has been added to cover the changes.

This fix fixes 27021.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-29 18:16:36 -07:00
..
decoder.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
errors.go Use apiError in server version middleware. 2016-09-16 12:27:14 -04:00
form.go Remove defensive check of mux vars handling. 2015-10-14 10:31:09 -07:00
form_test.go Resolves #16458 - filter events by labels. 2015-10-02 16:33:20 -04:00
httputils.go Disable HTML escaping for JSON strings in docker inspect 2016-09-29 18:16:36 -07:00