From 09160d2f4e699a72ccbb58c76b32a6670d965860 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 24 Jun 2018 15:17:04 +0200 Subject: sfeed_opml_import: escape ' properly the shell escape \' was a mistake. --- sfeed_opml_import.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c index 4c57b20..6fd51eb 100644 --- a/sfeed_opml_import.c +++ b/sfeed_opml_import.c @@ -21,9 +21,12 @@ printsafe(const char *s) for (; *s; s++) { if (iscntrl((int)*s)) continue; - if (*s == '\\' || *s == '\'') - putchar('\\'); - putchar((int)*s); + else if (*s == '\\') + fputs("\\\\", stdout); + else if (*s == '\'') + fputs("'\\''", stdout); + else + putchar((int)*s); } } -- cgit v1.2.3