[Mono-bugs] [Bug 75370][Nor] New - Incorrect HtmlDecode result
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Thu Jun 23 22:56:32 EDT 2005
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 mmorano at mikeandwan.us.
http://bugzilla.ximian.com/show_bug.cgi?id=75370
--- shadow/75370 2005-06-23 22:56:32.000000000 -0400
+++ shadow/75370.tmp.18808 2005-06-23 22:56:32.000000000 -0400
@@ -0,0 +1,95 @@
+Bug#: 75370
+Product: Mono: Class Libraries
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs at ximian.com
+ReportedBy: mmorano at mikeandwan.us
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Incorrect HtmlDecode result
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+
+
+Description of Problem:
+
+HttpUtility.HtmlDecode does not properly decode an HTML encoded string.
+
+
+Steps to reproduce the problem:
+1. Put the following code in test.cs
+
+using System;
+using System.Web;
+
+namespace Test
+{
+ public class HtmlDecodeTest
+ {
+ public static void Main(string[] args)
+ {
+ string x = "<html>& hello+= world!";
+ string y = HttpUtility.HtmlEncode(x);
+ string z = HttpUtility.HtmlDecode(y);
+
+ Console.WriteLine("input: " + x);
+ Console.WriteLine("encoded: " + y);
+ Console.WriteLine("decoded: " + z);
+ }
+ }
+}
+
+2. Compile with:
+gmcs -r:System -r:System.Web -out:test.exe test.cs
+
+3. Run mono test.exe. This outputs the following:
+
+input: <html>& hello+= world!
+encoded: <html>& hello+= world!
+decoded: <html>& hello+= world!0
+
+** Notice the zero at the end of the last string, this is the error.
+
+Actual Results:
+
+The output shown in step 3 above.
+
+
+Expected Results:
+
+A string that is first encoded, and that result is then decoded should
+result in the original string.
+
+
+How often does this happen?
+
+Always
+
+
+Additional Information:
+gmcs --version
+Mono C# compiler version 1.1.8.0
+
+Mono JIT compiler version 1.1.8, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+ TLS: __thread
+ GC: Included Boehm (with typed GC)
+ SIGSEGV : normal
+ Globalization: normal
+
+The machine is AMD64.
+
+This is a fresh build from svn a day or two ago (June 22/21).
+
+
+TIA!
+-Mike
More information about the mono-bugs
mailing list