From 5fe40c1422cb04d2ba37e5b07cf969c1a6f7f59c Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 21 Nov 2007 21:38:08 -0500 Subject: [PATCH] also encode \n\r\t characters --- src/kit/kit-string.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kit/kit-string.c b/src/kit/kit-string.c index 29dcf03..2b3d772 100644 --- a/src/kit/kit-string.c +++ b/src/kit/kit-string.c @@ -373,7 +373,7 @@ static kit_bool_t _is_reserved (char c) { unsigned int n; - char reserved[] = " !*'();:@&=+$,/?%#[]"; + char reserved[] = " !*'();:@&=+$,/?%#[]\n\r\t"; for (n = 0; n < sizeof (reserved); n++) { if (reserved[n] == c) @@ -399,10 +399,10 @@ _to_hex (unsigned int nibble) * @s: string to encode * * Percent encodes a string; each occurence of an ASCII characters in - * the set " !*'();:@&=+$,/?%#[]" will be replaced - * by a three character sequence started by the percent sign "%" and - * then the hexidecimal representation of the ASCII character in - * question. + * the set " !*'();:@&=+$,/?%#[]\n\r\t" will be + * replaced by a three character sequence started by the percent sign + * "%" and then the hexidecimal representation of the ASCII character + * in question. * * Returns: This function do not write more than @buf_size bytes * (including the trailing zero). If the output was truncated due to -- 2.7.4