summaryrefslogtreecommitdiff
path: root/sfeed_opml_import.c
diff options
context:
space:
mode:
Diffstat (limited to 'sfeed_opml_import.c')
-rw-r--r--sfeed_opml_import.c9
1 files 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);
}
}