HerrKater / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

Remove the XML declaration from the string returned by ErrorXml.EncodeString #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The method ErrorXml.EncodeString should return the XML content without the
XML declaration (i.e. "<?xml version="1.0"
encoding="utf-16" ?>"). More specifically, in ErrorXml.cs, line 196, the
following line should be added :
settings.OmitXmlDeclaration=true; 

This declaration is useless in a .NET string (all .NET strings are UTF-16
encoded, this is redundancy). Its presence could lead developers who use
this method and are unaware of XML/strings encoding matters into serious
trouble, that could easily be avoided by just removing it.
More insight in this thread :
http://groups.google.com/group/elmah/browse_frm/thread/ccdb67a6ba28d9ae

Original issue reported on code.google.com by mcarto...@gmail.com on 9 Jun 2009 at 4:06

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 9 Jun 2009 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 9 Jun 2009 at 5:03

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 9 Jun 2009 at 5:07

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 9 Jun 2009 at 5:08

GoogleCodeExporter commented 9 years ago
Implemented in r649.

Original comment by azizatif on 9 Jun 2009 at 5:08

GoogleCodeExporter commented 9 years ago
Implemented in r650 for trunk and 2.0.

Original comment by azizatif on 9 Jun 2009 at 5:17