[Mono-bugs] [Bug 77486][Nor] New - Uri.ToString() doesn't escape
'&' in query
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Feb 6 16:57:36 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by kiess at h3c.de.
http://bugzilla.ximian.com/show_bug.cgi?id=77486
--- shadow/77486 2006-02-06 16:57:36.000000000 -0500
+++ shadow/77486.tmp.8052 2006-02-06 16:57:36.000000000 -0500
@@ -0,0 +1,62 @@
+Bug#: 77486
+Product: Mono: Class Libraries
+Version: 1.0
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: kiess at h3c.de
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Uri.ToString() doesn't escape '&' in query
+
+Description of Problem:
+Uri.ToString() doesn't escape '&' in the query part.
+
+Steps to reproduce the problem:
+1. cat > Uri.cs << EOF
+using System;
+
+public class M {
+ public static void Main() {
+ Uri uri = new Uri ("http://h/p?q=a%26b");
+ Console.WriteLine (uri.Query);
+ Console.WriteLine (uri.ToString());
+ }
+}
+EOF
+2. mcs Uri.cs
+3. mono Uri.exe
+
+Actual Results:
+?q=a%26b
+http://h/p?q=a&b
+
+Expected Results:
+?q=a%26b
+http://h/p?q=a%26b
+
+
+How often does this happen?
+always
+
+Additional Information:
+I'm using Mono svn r56594
+
+In Uri.cs:1015 the chars '#', '%' and '?' are escaped:
+
+if (excludeSpecial && x == '#')
+ s.Append ("%23");
+else if (excludeSpecial && x == '%')
+ s.Append ("%25");
+else if (excludeSpecial && x == '?')
+ s.Append ("%3F");
+else {
+
+This propably also should be done for '&'.
More information about the mono-bugs
mailing list