fix(ooniprobe show): correctly handle % in the JSON (#738)
This diff fixes the way in which we print JSON results inside `ooniprobe show <ID>` by using the "%s" fmt specifier rather than using the JSON string itself as the format string. See https://github.com/ooni/probe/issues/2082 FWIW, `ooniprobe show --batch <ID>` was already WAI.
This commit is contained in:
parent
cced980387
commit
30e1ed9f40
|
@ -137,6 +137,6 @@ func logMeasurementJSON(w io.Writer, f log.Fields) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
fmt.Fprintf(w, string(json))
|
fmt.Fprintf(w, "%s", string(json))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user