From 931349025bb6b77124952473ab361bd49e30e182 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 13 Jun 2019 10:02:45 +0200 Subject: conf: safely escape weird input characters Signed-off-by: Jason A. Donenfeld --- conf/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/parser.go b/conf/parser.go index 88802688..3f64677b 100644 --- a/conf/parser.go +++ b/conf/parser.go @@ -23,7 +23,7 @@ type ParseError struct { } func (e *ParseError) Error() string { - return fmt.Sprintf("%s: ā€˜%sā€™", e.why, e.offender) + return fmt.Sprintf("%s: %q", e.why, e.offender) } func parseIPCidr(s string) (ipcidr *IPCidr, err error) { -- cgit v1.2.3-59-g8ed1b