[Mono-list] Uri::EscapeString two times with %
Jesper Pedersen
jep@itplus.dk
Wed, 25 Feb 2004 14:15:05 +0100
Hi.
When using the Uri::EscapeString(string) with the % character I get the
following using 0.30.1:
EscapeString("%") = %25 // Correct
EscapeString(EscapeString("%")) = %25 // Incorrect should be %2525
If I remove the statement
if('%'.Equals(c) && IsHexEncoding(str,i))
{
// if ,yes , copy it as is
s.Append(c);
s.Append(str[++i]);
s.Append(str[++i]);
continue;
}
from the method:
internal static string EscapeString (string str, bool escapeReserved, bool
escapeHex, bool escapeBrackets)
I get the correct result.
But I havn't run your testsuite (sorry) to consult if this leads to other
errors, since I just need to make the Uri::EscapeString(string) public in my
own class.
Hope this helps!
Cheers,
Jesper
P.S. Please cc: me as I'm not on the list.