aboutsummaryrefslogtreecommitdiffstats
path: root/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ls.c b/ls.c
index 6825759..f6d3e50 100644
--- a/ls.c
+++ b/ls.c
@@ -136,11 +136,28 @@ init_quote(void)
for (i = 0; i < 256; i++)
do_quote[i] = (isalnum(i) || ispunct(i)) ? 0 : 1;
+
+ /*
+ * From rfc 2396 section 2.2 "Reserved Characters":
+ * reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
+ * "$" | ","
+ */
+ do_quote[';'] = 1;
+ do_quote['/'] = 1;
+ do_quote['?'] = 1;
+ do_quote[':'] = 1;
+ do_quote['@'] = 1;
+ do_quote['&'] = 1;
+ do_quote['='] = 1;
do_quote['+'] = 1;
+ do_quote['$'] = 1;
+ do_quote[','] = 1;
+
+ /* Escape erroneous anchors, escapes, and quotes */
do_quote['#'] = 1;
do_quote['%'] = 1;
do_quote['"'] = 1;
- do_quote['?'] = 1;
+ do_quote['\''] = 1;
}
char*