Changeset dd8d4c5


Ignore:
Timestamp:
2006-01-10T14:36:49Z (19 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
277674c, 8e419cb
Parents:
4fe4be2
Message:

http_encode() now just escapes everything except [A-Za-z0-9]. Should fix #83.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    r4fe4be2 rdd8d4c5  
    3636#include <stdlib.h>
    3737#include <string.h>
     38#include <ctype.h>
    3839#include <glib.h>
    3940#include <time.h>
     
    377378        for( i = j = 0; t[i]; i ++, j ++ )
    378379        {
    379                 if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' )
     380                /* if( t[i] <= ' ' || ((unsigned char *)t)[i] >= 128 || t[i] == '%' ) */
     381                if( !isalnum( t[i] ) )
    380382                {
    381383                        sprintf( s + j, "%%%02X", ((unsigned char*)t)[i] );
Note: See TracChangeset for help on using the changeset viewer.