2004-10-18 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 18 Oct 2004 15:35:38 +0000 (15:35 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 18 Oct 2004 15:35:38 +0000 (15:35 -0000)
* XmlTextReader.cs :
  Fixed CheckCharacters setter that always set false.
  CheckCharacters check is also required for ReadText(). This fixes
  bug #68449.

svn path=/trunk/mcs/; revision=35085

mcs/class/System.XML/System.Xml/ChangeLog
mcs/class/System.XML/System.Xml/XmlTextReader.cs

index f3e55db4ec6588c1c060fe85f3c75b4c48f3f856..2e9d2662689ad6bc60deb231d8ed1a6fc1f30eae 100644 (file)
@@ -1,3 +1,16 @@
+2004-10-18  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlTextReader.cs :
+         Fixed CheckCharacters setter that always set false.
+         CheckCharacters check is also required for ReadText(). This fixes
+         bug #68449.
+
+2004-10-15  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XmlTextReader.cs : Inside DTD, '<' character inside XML comment 
+         is regatded as invalid. This fixes bug #68410. (Error message was
+         also not correct.)
+
 2004-10-14  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XmlWriter.cs : CreateTextWriter() is private.
index d0116de7e65d485c859207b998c29d9cce0ea969..f1d5b59e8b04e5f2364e7c63c64d26bd4fe4522d 100644 (file)
@@ -167,7 +167,7 @@ namespace System.Xml
 
                internal bool CharacterChecking {
                        get { return checkCharacters && normalization; }
-                       set { checkCharacters = false; }
+                       set { checkCharacters = value; }
                }
 
                // for XmlReaderSettings.CloseInput support
@@ -1723,7 +1723,7 @@ namespace System.Xml
                                                AppendValueChar ('\n');
                                        // and in case of "\r\n", discard '\r'.
                                } else {
-                                       if (XmlChar.IsInvalid (ch))
+                                       if (CharacterChecking && XmlChar.IsInvalid (ch))
                                                throw new XmlException (this, "Not allowed character was found.");
                                        ch = ReadChar ();
                                }