Index: src/OFURLEncoding.m ================================================================== --- src/OFURLEncoding.m +++ src/OFURLEncoding.m @@ -80,10 +80,12 @@ for (st = 0, i = 0, c = 0; *s; s++) { switch (st) { case 0: if (*s == '%') st = 1; + else if (*s == '+') + ret_c[i++] = ' '; else ret_c[i++] = *s; break; case 1: case 2: Index: tests/OFString/OFString.m ================================================================== --- tests/OFString/OFString.m +++ tests/OFString/OFString.m @@ -153,11 +153,12 @@ CHECK([[a objectAtIndex: j++] isEqual: @""]) CHECK([[a objectAtIndex: j++] isEqual: @""]) /* URL encoding tests */ CHECK([[@"foo\"ba'_$" stringByURLEncoding] isEqual: @"foo%22ba%27_%24"]) - CHECK([[@"foo%20bar%22%24" stringByURLDecoding] isEqual: @"foo bar\"$"]) + CHECK([[@"foo%20bar%22+%24" stringByURLDecoding] + isEqual: @"foo bar\" $"]) CHECK_EXCEPT([@"foo%bar" stringByURLDecoding], OFInvalidEncodingException) CHECK_EXCEPT([@"foo%FFbar" stringByURLDecoding], OFInvalidEncodingException)