X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tools%2Fgpgconf-comp.c;h=9358e2efac0d4fd943973517481c9d58012fbd9c;hb=d42f05d1e180cc6cd24f9e186d8170723561c84b;hp=530c1287f2b7b8bc837d5ee50f0a856559273f48;hpb=2cfc85745d79b473f2be099c9a19220b36366738;p=gnupg2.git diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index 530c128..9358e2e 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -1490,6 +1490,13 @@ gc_percent_escape (const char *src) *(dst++) = '2'; *(dst++) = 'c'; } + else if (*src == '\n') + { + /* The newline is problematic in a line-based format. */ + *(dst++) = '%'; + *(dst++) = '0'; + *(dst++) = 'a'; + } else *(dst++) = *(src); src++;