On Wed, Feb 16, 2022 at 12:09:24PM -0500, Viktor Dukhovni wrote: > > I think I missed that "jq -r" output is still json-escaped. In that > > light, is there any need for 3.7-style sanitization of json output? > > We could still revert that early in 3.7.1; I doubt that this would > > break things already. > > Actually, no, with "-r" not only are quotes removed, but also escaped > forms are converted back to the underlying UTF-8 form, and control > characters are output verbatim (as newlines, ESC, ...).
Example: $ printf "%s\n" '"foo\nbar\nbaz"' "foo\nbar\nbaz" $ printf "%s\n" '"foo\nbar\nbaz"' | jq -r foo bar baz -- Viktor.