runtime
runtime copied to clipboard
Reevaluate a design decision - XDocument allows double-hyphen within comment by adding a space in between
XDocument allows "--" within a comment by representing it with a space between the two hyphens (“- -“) in the outer Xml. However, when reading the document, the XmlReader will contain the invalid content “--“ which was forbidden in the outer Xml. According to the spec, double-hyphen MUST NOT occur within comments.
This is not a regression issue. I tried writing some tests for Desktop. Tests are attached. The behavior was consistent among corefx and Desktop.
Won't fix due to Desktop compat. We can change our mind later if necessary