Merge pull request #2566 from lambdageek/monoerror-mono_module_get_object
[mono.git] / mcs / class / corlib / Mono.Xml / SecurityParser.cs
index 2e8b67595143a446bf89b867d64370bce93a81f6..49919b9779d1c53fcba30ea571a8cad403cb5bfe 100644 (file)
@@ -91,7 +91,7 @@ namespace Mono.Xml {
                        // attributes
                        int n = attrs.Length;
                        for (int i=0; i < n; i++)
-                               current.AddAttribute (attrs.GetName (i), attrs.GetValue (i));
+                               current.AddAttribute (attrs.GetName (i), SecurityElement.Escape (attrs.GetValue (i)));
                }
 
                public void OnEndElement (string name) 
@@ -101,7 +101,7 @@ namespace Mono.Xml {
 
                public void OnChars (string ch) 
                {
-                       current.Text = ch;
+                       current.Text = SecurityElement.Escape (ch);
                }
 
                public void OnEndParsing (SmallXmlParser parser) {}