aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgconf-comp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/gpgconf-comp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index d53947e7f..0c939e5e0 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -1491,6 +1491,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++;