aboutsummaryrefslogtreecommitdiffstats
path: root/lib/misc.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2010-06-03 23:13:57 +0200
committerSven Moritz Hallberg <pesco@khjk.org>2010-06-03 23:13:57 +0200
commitbb09b3c6b8190be09e0b7c7ef2f4b1b5a69b504f (patch)
treede453c5fc945d9cafc8ffb5705ab4fe7834bcd32 /lib/misc.c
parenta6b2f13e38e75e7bca00a1e6c1963783f244c0b2 (diff)
parentdf1ae6223a5fdb3c18d5438670834285101c6213 (diff)
merge in bitlbee 1.2.7
Diffstat (limited to 'lib/misc.c')
-rw-r--r--lib/misc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/misc.c b/lib/misc.c
index af453020..263d840d 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -315,8 +315,7 @@ void http_encode( char *s )
for( i = j = 0; t[i]; i ++, j ++ )
{
- /* if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' ) */
- if( !isalnum( t[i] ) )
+ if( !isalnum( t[i] ) && !strchr( "._-~", t[i] ) )
{
sprintf( s + j, "%%%02X", ((unsigned char*)t)[i] );
j += 2;