--- src/ne_uri.c.orig 2011-11-23 03:26:30.000000000 +0400 +++ src/ne_uri.c 2014-04-28 19:37:28.005947413 +0400 @@ -96,7 +96,7 @@ /* 0xXX x0 x2 x4 x6 x8 xA xC xE */ /* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, /* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* 2x */ OT, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, +/* 2x */ AL, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, /* 3x */ DG, DG, DG, DG, DG, DG, DG, DG, DG, DG, CL, SD, OT, SD, OT, QU, /* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, /* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US, @@ -475,7 +475,7 @@ /* CH must be an unsigned char; evaluates to 1 if CH should be * percent-encoded (note !!x == x ? 1 : 0). */ -#define path_escape_ch(ch) (!!(uri_lookup(ch) & URI_ESCAPE)) +#define path_escape_ch(ch) ((ch == ' ') | (!!(uri_lookup(ch) & URI_ESCAPE))) char *ne_path_escape(const char *path) { .