From 6e3016030556c37994a9f3ecadd81bfa747b0b72 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Thu, 3 Aug 2000 14:21:32 +0000 Subject: be more specific about quoting variables --- src/shvar.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/shvar.c b/src/shvar.c index 48f62ce0..765a77e7 100644 --- a/src/shvar.c +++ b/src/shvar.c @@ -133,8 +133,8 @@ unescape(char *s) { /* create a new string with all necessary characters escaped. * caller must free returned string */ -static const char escapees[] = "\"'\\$~`"; /* must be escaped */ -static const char spaces[] = " \t"; /* only require "" */ +static const char escapees[] = "\"'\\$~`"; /* must be escaped */ +static const char spaces[] = " \t|&;()<>"; /* only require "" */ static char * escape(const char *s) { char *new; @@ -280,7 +280,7 @@ svSetValue(shvarFile *s, const char *key, const char *value) if (val1 && newval && !strcmp(val1, newval)) goto bail; if (s->parent) val2 = svGetValue(s->parent, key); - if (!newval) { + if (!newval || !newval[0]) { /* delete value somehow */ if (val2) { /* change/append line to get key= */ -- cgit v1.2.1