[Mono-bugs] [Bug 60181][Nor] New - Small change needed to fix TraceOutput formatting in Internet Explorer
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 15 Jun 2004 00:50:56 -0400 (EDT)
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 davidandrewtaylor@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=60181
--- shadow/60181 2004-06-15 00:50:56.000000000 -0400
+++ shadow/60181.tmp.19567 2004-06-15 00:50:56.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 60181
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity: 001 One hour
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: davidandrewtaylor@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Small change needed to fix TraceOutput formatting in Internet Explorer
+
+Gonzalo recently fixed TraceData.cs to HtmlEncode the output to ensure
+valid HTML pages are being returned to the web browser when the Trace
+data is viewed at the bottom of a web page.
+
+He also put in a fix to convert "\n" to "<br />" and " " to " " to
+make sure the printed results are nicely formatted. This is the code
+here:
+
+string res = HttpUtility.HtmlEncode (s);
+res = res.Replace ("\n", "<br />");
+return res.Replace (" ", " ");
+** Note that this actually encodes the BR as "<br >".
+
+While this works well in Mozilla, I have noticed that Internet Explorer
+does not treat "<br >" as a break. Could you please change the code
+to the following:
+
+string res = HttpUtility.HtmlEncode (s);
+res = res.Replace (" ", " ");
+return res.Replace ("\n", "<br />");
+
+I realize it is a small change, but it will ensure the trace output is
+correctly formatted in Internet Explorer (it will look the same as
+MS.NET).
+
+Thanks Gonzalo/Jackson,
+
+David Taylor