When pasting in XML or HTML formatted text to the WYSIWYG editor in a code block, all element and attribute names are lowercased. For example, the manually typed XML:
<exampleXml><innerElement attrOne="Text" attrTwo="MoreText" /></exampleXml>
becomes the following when pasted:
<examplexml><innerelement attrone="Text" attrtwo="MoreText"></innerelement></examplexml>
Also, if the XML/HTML pasted in has open tags or empty closed tags the full closing tag will be automatically generated.
We are using third-party redactor. Will try to find the problem and fix it or check the last update if it's already fixed. We are not sure how long it will take.
So, for now we could advise you to paste the code (as a regular text), then mark it as a code. In this case it works just fine for us.