runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Reevaluate a design decision - XDocument allows double-hyphen within comment by adding a space in between

Open sepidehkh opened this issue 11 years ago • 1 comments

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.

WriteCommentWithDoubleHyphensTests.txt

sepidehkh avatar Oct 22 '15 00:10 sepidehkh

Won't fix due to Desktop compat. We can change our mind later if necessary

karelz avatar Oct 10 '16 22:10 karelz